<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="GENERATOR" content="Quadralay WebWorks Publisher Professional Edition 7.0.2.1206" />
    <meta name="TEMPLATEBASE" content="book-w-index" />
    <meta name="LASTUPDATED" content="10/31/02 19:51:14" />
    <title>Reference Documentation for com.sun.midp.ssl</title>
    <link rel="StyleSheet" href="document.css" type="text/css" />
    <link rel="StyleSheet" href="catalog.css" type="text/css" />
    <link rel="Table of Contents" href="index.html" />
    <link rel="Previous" href="appx-config-opts.html" />
    <link rel="Next" href="portIX.html" />
    <link rel="Index" href="portIX.html" />
  </head>

  <body>

    <table class="full-width" id="SummaryNotReq1">
      <tr><td class="sun-darkblue">&#160;</td></tr>
      <tr><td class="sun-lightblue">&#160;</td></tr>
      <tr><td class="go-right">
        <a accesskey="c" href="index.html">
          <img id="LongDescNotReq1" src="images/toc.gif" border="0"
            alt="Contents" /></a>
	<a accesskey="p" href="appx-config-opts.html">
	  <img id="LongDescNotReq2" src="images/prev.gif" border="0"
            alt="Previous" /></a>
        <a accesskey="n" href="portIX.html">
	  <img id="LongDescNotReq3" src="images/next.gif" border="0"
            alt="Next" /></a>
        <a accesskey="i" href="portIX.html">
	  <img id="LongDescNotReq4" src="images/index.gif" border="0"
            alt="Index" /></a>
        </td>
      </tr>
    </table>

<a name="wp1035128"> </a><h2 class="pAppxNum">
Appendix &#160; C
</h2>
<a name="wp1035145"> </a><h2 class="pNewHTMLPage">
Reference Documentation for com.sun.midp.ssl
</h2>
<hr class="pHr"/>
<a name="wp1035154"> </a><p class="pBody">
This appendix reproduces the reference documentation for the <code class="cCode">com.sun.ssl</code> package that is generated by the Javadoc&#8482; tool.
</p>
<a name="wp1035157"> </a><p class="pBody">

</p>
<a name="wp263028"> </a><h2 class="pHeading1">
Package
</h2>
<a name="wp263034"> </a><h3 class="pHeading2">
com.sun.midp.ssl
</h3>
<a name="wp263036"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263038"> </a><p class="pBody">
Provides a reference implementation of SSLv3.0 for MIDP. The code is modified version of KSSL (<a href="http://sunlabs.eng/~vgupta/ssl/kssl/index.html" target="_blank">
<span class="cWebJump">http://sunlabs.eng/~vgupta/ssl/kssl/index.html</span></a>) from Sun Labs.
</p>
<a name="wp263040"> </a><p class="pBody">
Supports abbreviated SSL handshakes.
</p>
<a name="wp263042"> </a><p class="pBody">
Does not support SSL client authentication. This is because purpose of HTTPS for MIDP is to provide the wireless device with end-to-end confidentiality. The authentication must be done at the application level, which is what nearly all consumer applications do.
</p>
<a name="wp263044"> </a><p class="pBody">
Only supports the SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_MD5, and SSL_RSA_EXPORT_WITH_RC4_40_MD5 cipher suites. All known HTTPS servers support these suites.
</p>
<a name="wp263046"> </a><p class="pBody">
Only Supports RSA X.509 certificates, these are the defacto standard. KSSL supports version 1, 2, and 3 X.509 certificates signed using RSA with either SHA-1, MD5 and MD2. For security reasons only version 3 certificates are allowed to be chained. While the key usage extension is supported, the name constraints extension is not.
</p>
<a name="wp1043446"> </a><h4 class="pHeading3">
Related Information
</h4>
<a name="wp1043447"> </a><p class="pBody">
SSL for Java&#8482; 2 Micro-Edition <br />(<a href="http://sunlabs.eng/~vgupta/ssl/kssl/index.html" target="_blank">
<span class="cWebJump">http://sunlabs.eng/~vgupta/ssl/kssl/index.html</span></a>)
</p>
<a name="wp263052"> </a><p class="pBody">
A Good Introduction to SSL <br />(<a href="http://docs.iplanet.com/docs/manuals/security/sslin/index.htm" target="_blank">
<span class="cWebJump">http://docs.iplanet.com/docs/manuals/security/sslin/index.htm</span></a>)
</p>
<a name="wp263054"> </a><p class="pBody">
A Good Introduction to Public Key Cryptography <br />(<a href="http://docs.iplanet.com/docs/manuals/security/pkin/index.htm" target="_blank">
<span class="cWebJump">http://docs.iplanet.com/docs/manuals/security/pkin/index.htm</span></a>)
</p>
<a name="wp263056"> </a><p class="pBody">
RFC 2246, The TLS Protocol Version 1.0 <br />(<a href="http://www.ietf.org/rfc/rfc2246.txt" target="_blank">
<span class="cWebJump">http://www.ietf.org/rfc/rfc2246.txt</span></a>)
</p>
<a name="wp263058"> </a><p class="pBody">
SSL Protocol Version 3.0 <br />(<a href="http://home.netscape.com/eng/ssl3/draft302.txt" target="_blank">
<span class="cWebJump">http://home.netscape.com/eng/ssl3/draft302.txt</span></a>)
</p>
<a name="wp263060"> </a><p class="pBody">
RFC 2459, Internet X.509 Public Key Infrastructure Certificate and CRL Profile (<a href="http://www.ietf.org/rfc/rfc2459.txt" target="_blank">
<span class="cWebJump">http://www.ietf.org/rfc/rfc2459.txt</span></a>)
</p>
<a name="wp263062"> </a><p class="pBody">
RSA&#8217;s PKCS (Public Key Cryptography Standards) document set. <br />(<a href="http://www.rsasecurity.com/rsalabs/pkcs/" target="_blank">
<span class="cWebJump">http://www.rsasecurity.com/rsalabs/pkcs/</span></a>)
</p>
<a name="wp263064"> </a><h4 class="pHeading3">
Since:
</h4>
<a name="wp263066"> </a><p class="pIndented1">
MIDP 2.0
</p>
<a name="wp263069"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the classes, interfaces, and exceptions in the package. The left column gives the interface or class name; the right column gives the description. The rows that span all columns are embedded headings." id="wp260755">
  <caption><a name="wp260755"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp260595"> </a><div style="text-align: left" class="pTableHead">
Class Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260601"> </a><div style="text-align: left" class="pTableHead">
Interfaces
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
CertStore<a name="wp260609"> </a>
</pre></div>
</td>
    <td><a name="wp260611"> </a><div class="pTableText">
This <em class="cEmphasis">interface</em> supports storage of certificates (not private keys or symmetric keys).
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
Key<a name="wp260619"> </a>
</pre></div>
</td>
    <td><a name="wp260621"> </a><div class="pTableText">
Implements an abstract class that represents all keys (both symmetric and asymmetric).
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
PrivateKey<a name="wp260629"> </a>
</pre></div>
</td>
    <td><a name="wp260631"> </a><div class="pTableText">
The PrivateKey abstract class is the base class for all private keys used in asymmetric algorithms.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
PublicKey<a name="wp260639"> </a>
</pre></div>
</td>
    <td><a name="wp260641"> </a><div class="pTableText">
The PublicKey abstract class is the base class for all public keys used in asymmetric algorithms.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
RSAPrivateKey<a name="wp260649"> </a>
</pre></div>
</td>
    <td><a name="wp260651"> </a><div class="pTableText">
Specifies the RSA private key interface.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
RSAPublicKey<a name="wp260659"> </a>
</pre></div>
</td>
    <td><a name="wp260661"> </a><div class="pTableText">
Specifies the RSA public key interface.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260667"> </a><div style="text-align: left" class="pTableHead">
Classes
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
KeyBuilder<a name="wp260675"> </a>
</pre></div>
</td>
    <td><a name="wp260677"> </a><div class="pTableText">
The KeyBuilder class is used to generate key objects for use in cryptographic operations.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
MessageDigest<a name="wp260685"> </a>
</pre></div>
</td>
    <td><a name="wp260687"> </a><div class="pTableText">
Implements an abstract class that generalizes all message digests.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
RandomData<a name="wp260695"> </a>
</pre></div>
</td>
    <td><a name="wp260697"> </a><div class="pTableText">
Implements an abstract class that generalizes random number generators.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
SecretKey<a name="wp260705"> </a>
</pre></div>
</td>
    <td><a name="wp260707"> </a><div class="pTableText">
Implements the base interface for keys used in symmetric algorithms.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
Signature<a name="wp260715"> </a>
</pre></div>
</td>
    <td><a name="wp260717"> </a><div class="pTableText">
Implements an abstract class that generalizes all signature algorithms.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
SSLStreamConnection<a name="wp260725"> </a>
</pre></div>
</td>
    <td><a name="wp260727"> </a><div class="pTableText">
The SSLStreamConnection class implements the StreamConnection interface.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
X509Certificate<a name="wp260735"> </a>
</pre></div>
</td>
    <td><a name="wp260737"> </a><div class="pTableText">
This class implements methods for creating X.509 certificates and accessing their attributes such as subject/issuer names, public keys and validity information.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260743"> </a><div style="text-align: left" class="pTableHead">
Exceptions
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
CryptoException<a name="wp260751"> </a>
</pre></div>
</td>
    <td><a name="wp260753"> </a><div class="pTableText">
Implements CryptoException which is thrown when a cryptographic method encounters an error.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263071"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263079"> </a><h3 class="pHeading2">
CertStore
</h3>
<a name="wp263081"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public interface<span class="cUserType"> CertStore</span><a name="wp263083"> </a>
</pre></div>
<a name="wp263085"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp1038819"> </a><p class="pBody">
This <em class="cEmphasis">interface</em> supports storage of certificates (not private keys or symmetric keys).
</p>
<a name="wp1038839"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the methods of this class. The left column gives the type, while the right column gives the method signature and description. Rows that span columns are headers." id="wp1038822">
  <caption><a name="wp1038822"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp1038826"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp1038830"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 X509Certificate[]<a name="wp1038834"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getCertificates(java.lang.String subjectName)<a name="wp1038837"> </a>
</pre></div>
<a name="wp1038838"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the certificate(s) corresponding to a subject name string.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp1038840"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp1043435"> </a><h4 class="pHeading3">
getCertificates(String)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public com.sun.midp.ssl.X509Certificate[] <b class="cBold">getCertificates</b>(<code class="cCode">java.lang.String</code> subjectName)<a name="wp1043436"> </a>
</pre></div>
<a name="wp263106"> </a><p class="pIndented1">
Returns the certificate(s) corresponding to a subject name string.
</p>
<a name="wp263108"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263110"> </a><p class="pIndented2">
<code class="cCode">subjectName</code> - subject name of the certificate in printable form.
</p>
<a name="wp263112"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263114"> </a><p class="pIndented2">
corresponding certificates or null (if not found)
</p>
<a name="wp263116"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263124"> </a><h3 class="pHeading2">
CryptoException
</h3>
<a name="wp263126"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public class <span class="cUserType">CryptoException</span> extends <code class="cCode">java.lang.Exception</code><a name="wp263128"> </a>
 <a name="wp263130"> </a>
<code class="cCode">java.lang.Object</code><a name="wp263132"> </a>
&#160;&#160;|<a name="wp263134"> </a>
&#160;&#160;+--<code class="cCode">java.lang.Throwable</code><a name="wp263136"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;|<a name="wp263138"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;+--<code class="cCode">java.lang.Exception</code><a name="wp263140"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;|<a name="wp263142"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.CryptoException</b><a name="wp263144"> </a>
</pre></div>
<a name="wp263146"> </a><h4 class="pHeading3">
All Implemented Interfaces:
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
java.io.Serializable<a name="wp263148"> </a>
</pre></div>
<a name="wp263150"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263152"> </a><p class="pBody">
Implements CryptoException which is thrown when a cryptographic method encounters an error.
</p>
<a name="wp263155"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the fields, constructors, and methods of this class. The left column gives the type, while the right column gives the field name, constructor signature, or method signature, and a description. Rows that span columns are headers." id="wp260921">
  <caption><a name="wp260921"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp260793"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260799"> </a><div style="text-align: left" class="pTableHead">
Fields
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static short<a name="wp260805"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ILLEGAL_ENCODING<a name="wp260809"> </a>
</pre></div>
<a name="wp260811"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates that encrypted message was illegal encoded.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static short<a name="wp260817"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ILLEGAL_USE<a name="wp260821"> </a>
</pre></div>
<a name="wp260823"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates illegal use of a method.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static short<a name="wp260829"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ILLEGAL_VALUE<a name="wp260833"> </a>
</pre></div>
<a name="wp260835"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates a method was passed illegal parameter values.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static short<a name="wp260841"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
INVALID_INIT<a name="wp260845"> </a>
</pre></div>
<a name="wp260847"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates an object has not been properly initialized for the requested operation.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static short<a name="wp260853"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
NO_SUCH_ALGORITHM<a name="wp260857"> </a>
</pre></div>
<a name="wp260859"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates that a requested algorithm or key type is not supported.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static short<a name="wp260865"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
UNINITIALIZED_KEY<a name="wp260869"> </a>
</pre></div>
<a name="wp260871"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates that is key object has not been properly initialized.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260877"> </a><div style="text-align: left" class="pTableHead">
Constructors
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
&#160;<a name="wp260883"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
CryptoException(short reason)<a name="wp260887"> </a>
</pre></div>
<a name="wp260889"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Constructs a CryptoException with the specified reason code.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260895"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static void<a name="wp260901"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
throwIt(short reason)<a name="wp260905"> </a>
</pre></div>
<a name="wp260907"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Throws a CryptoException with the specified reason code.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
java.lang.String<a name="wp260913"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
toString()<a name="wp260917"> </a>
</pre></div>
<a name="wp260919"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns a human readable string describing the CryptoException.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263158"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" id="wp260946">
  <caption><a name="wp260946"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp260928"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp260932"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp260936"> </a>
</pre></div>
</td>
</tr>
  <tr align="left">    <td><a name="wp260940"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Throwable
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">fillInStackTrace()</code>, <code class="cCode">getLocalizedMessage()</code>, <code class="cCode">getMessage()</code>, <code class="cCode">printStackTrace(PrintWriter)</code>, <code class="cCode">printStackTrace(PrintWriter)</code>, <code class="cCode">printStackTrace(PrintWriter)</code><a name="wp260944"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263160"> </a><h3 class="pHeading2">
Fields
</h3>
<a name="wp263168"> </a><h4 class="pHeading3">
ILLEGAL_ENCODING
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final short <b class="cBold">ILLEGAL_ENCODING</b><a name="wp263170"> </a>
</pre></div>
<a name="wp263172"> </a><p class="pIndented1">
Indicates that encrypted message was illegal encoded.
</p>
<a name="wp263180"> </a><h4 class="pHeading3">
ILLEGAL_USE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final short <b class="cBold">ILLEGAL_USE</b><a name="wp263182"> </a>
</pre></div>
<a name="wp263184"> </a><p class="pIndented1">
Indicates illegal use of a method.
</p>
<a name="wp263192"> </a><h4 class="pHeading3">
ILLEGAL_VALUE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final short <b class="cBold">ILLEGAL_VALUE</b><a name="wp263194"> </a>
</pre></div>
<a name="wp263196"> </a><p class="pIndented1">
Indicates a method was passed illegal parameter values.
</p>
<a name="wp263204"> </a><h4 class="pHeading3">
INVALID_INIT
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final short <b class="cBold">INVALID_INIT</b><a name="wp263206"> </a>
</pre></div>
<a name="wp263208"> </a><p class="pIndented1">
Indicates an object has not been properly initialized for the requested operation.
</p>
<a name="wp263216"> </a><h4 class="pHeading3">
NO_SUCH_ALGORITHM
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final short <b class="cBold">NO_SUCH_ALGORITHM</b><a name="wp263218"> </a>
</pre></div>
<a name="wp263220"> </a><p class="pIndented1">
Indicates that a requested algorithm or key type is not supported.
</p>
<a name="wp263228"> </a><h4 class="pHeading3">
UNINITIALIZED_KEY
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final short <b class="cBold">UNINITIALIZED_KEY</b><a name="wp263230"> </a>
</pre></div>
<a name="wp263232"> </a><p class="pIndented1">
Indicates that is key object has not been properly initialized.
</p>
<a name="wp263234"> </a><h3 class="pHeading2">
Constructors
</h3>
<a name="wp263242"> </a><h4 class="pHeading3">
CryptoException(short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <b class="cBold">CryptoException</b>(short reason)<a name="wp263244"> </a>
</pre></div>
<a name="wp263246"> </a><p class="pIndented1">
Constructs a CryptoException with the specified reason code.
</p>
<a name="wp263248"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263250"> </a><p class="pIndented2">
<code class="cCode">reason</code> - reason code
</p>
<a name="wp263252"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp263260"> </a><h4 class="pHeading3">
throwIt(short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static void <b class="cBold">throwIt</b>(short reason)throws&#160;CryptoException<a name="wp263262"> </a>
</pre></div>
<a name="wp263264"> </a><p class="pIndented1">
Throws a CryptoException with the specified reason code.
</p>
<a name="wp263266"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263268"> </a><p class="pIndented2">
<code class="cCode">reason</code> - reason code
</p>
<a name="wp263270"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp263274"> </a><p class="pIndented2">
CryptoException - with the specified reason code
</p>
<a name="wp263282"> </a><h4 class="pHeading3">
toString()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">toString</b>()<a name="wp263284"> </a>
</pre></div>
<a name="wp263286"> </a><p class="pIndented1">
Returns a human readable string describing the CryptoException.
</p>
<a name="wp263288"> </a><h5 class="pHeading4Indented">
Overrides:
</h5>
<a name="wp263290"> </a><p class="pIndented2">
<code class="cCode">toString</code> in class <code class="cCode">Throwable</code>
</p>
<a name="wp263292"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263294"> </a><p class="pIndented2">
string representation of the CryptoException
</p>
<a name="wp263296"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263304"> </a><h3 class="pHeading2">
Key
</h3>
<a name="wp263306"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public interface<span class="cUserType"> Key</span><a name="wp263308"> </a>
</pre></div>
<a name="wp263310"> </a><h4 class="pHeading3">
All Known Subinterfaces:
</h4>
<a name="wp263320"> </a><p class="pIndented1">
PrivateKey, PublicKey, RSAPrivateKey, RSAPublicKey
</p>
<a name="wp263322"> </a><h4 class="pHeading3">
All Known Implementing Classes:
</h4>
<a name="wp263326"> </a><p class="pIndented1">
SecretKey
</p>
<a name="wp263328"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263330"> </a><p class="pBody">
Implements an abstract class that represents all keys (both symmetric and asymmetric).
</p>
<a name="wp263333"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the methods of this class. The left column gives the return type, while the right column gives the method signature and description. The first two rows are headers." id="wp261021">
  <caption><a name="wp261021"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp260953"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp260959"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp260965"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
clearKey()<a name="wp260969"> </a>
</pre></div>
<a name="wp260971"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Clears the key and sets it to an uninitialized state.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 short<a name="wp260977"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSize()<a name="wp260981"> </a>
</pre></div>
<a name="wp260983"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the key size in number of bits.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 byte<a name="wp260989"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getType()<a name="wp260993"> </a>
</pre></div>
<a name="wp260995"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the key type.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 boolean<a name="wp261001"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
isInitialized()<a name="wp261005"> </a>
</pre></div>
<a name="wp261007"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns true if and only if a key has been initialized.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp261013"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
toString()<a name="wp261017"> </a>
</pre></div>
<a name="wp261019"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Converts a key object to its human readable string representation.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263335"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp263343"> </a><h4 class="pHeading3">
clearKey()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">clearKey</b>()<a name="wp263345"> </a>
</pre></div>
<a name="wp263347"> </a><p class="pIndented1">
Clears the key and sets it to an uninitialized state.
</p>
<a name="wp263355"> </a><h4 class="pHeading3">
getSize()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public short <b class="cBold">getSize</b>()<a name="wp263357"> </a>
</pre></div>
<a name="wp263359"> </a><p class="pIndented1">
Returns the key size in number of bits.
</p>
<a name="wp263361"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263363"> </a><p class="pIndented2">
the key size in number of bits
</p>
<a name="wp263371"> </a><h4 class="pHeading3">
getType()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public byte <b class="cBold">getType</b>()<a name="wp263373"> </a>
</pre></div>
<a name="wp263375"> </a><p class="pIndented1">
Returns the key type.
</p>
<a name="wp263377"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263379"> </a><p class="pIndented2">
the key type
</p>
<a name="wp263387"> </a><h4 class="pHeading3">
isInitialized()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public boolean <b class="cBold">isInitialized</b>()<a name="wp263389"> </a>
</pre></div>
<a name="wp263391"> </a><p class="pIndented1">
Returns true if and only if a key has been initialized. A key is not initialized until all associated set methods have been called at least once since the last time the key was in an uninitialized state.
</p>
<a name="wp263393"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263395"> </a><p class="pIndented2">
true if the key has been initialized, false otherwise
</p>
<a name="wp263403"> </a><h4 class="pHeading3">
toString()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">toString</b>()<a name="wp263405"> </a>
</pre></div>
<a name="wp263407"> </a><p class="pIndented1">
Converts a key object to its human readable string representation.
</p>
<a name="wp263409"> </a><h5 class="pHeading4Indented">
Overrides:
</h5>
<a name="wp263411"> </a><p class="pIndented2">
<code class="cCode">toString</code> in class <code class="cCode">Object</code>
</p>
<a name="wp263413"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263415"> </a><p class="pIndented2">
a human readable string representation of the key
</p>
<a name="wp263417"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263425"> </a><h3 class="pHeading2">
KeyBuilder
</h3>
<a name="wp263427"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public class <span class="cUserType">KeyBuilder</span><a name="wp263429"> </a>
 <a name="wp263431"> </a>
<code class="cCode">java.lang.Object</code><a name="wp263433"> </a>
&#160;&#160;|<a name="wp263435"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.KeyBuilder</b><a name="wp263437"> </a>
</pre></div>
<a name="wp263439"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263441"> </a><p class="pBody">
The KeyBuilder class is used to generate key objects for use in cryptographic operations. It is a key object factory. This version of the implementation only supports symmetric keys and RSA keys with modulus lengths up to and including 1024-bits. DSA keys are not supported.
</p>
<a name="wp263443"> </a><h4 class="pHeading3">
See Also:
</h4>
<a name="wp263447"> </a><p class="pIndented1">
Key
</p>
<a name="wp263450"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the fields, constructors, and methods of this class. The left column gives the type, while the right column gives the field name, constructor signature, or method signature, and a description. Rows that span columns are headers." id="wp261108">
  <caption><a name="wp261108"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261030"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261036"> </a><div style="text-align: left" class="pTableHead">
Fields
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261042"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TYPE_ARCFOUR<a name="wp261046"> </a>
</pre></div>
<a name="wp261048"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates an ARCfour key type.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261054"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TYPE_RSA_PRIVATE<a name="wp261058"> </a>
</pre></div>
<a name="wp261060"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates an RSA private key type.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261066"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TYPE_RSA_PUBLIC<a name="wp261070"> </a>
</pre></div>
<a name="wp261072"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates an RSA public key type.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261078"> </a><div style="text-align: left" class="pTableHead">
Constructors
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
&#160;<a name="wp261084"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
KeyBuilder()<a name="wp261088"> </a>
</pre></div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261094"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static Key<a name="wp261100"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
buildKey(byte kType, short kLen, boolean kEnc)<a name="wp261104"> </a>
</pre></div>
<a name="wp261106"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Creates cryptographic keys of the specified type and length.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263453"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists the methods that this class inherits. The first two rows are headers." id="wp261125">
  <caption><a name="wp261125"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261115"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261119"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">toString()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp261123"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263455"> </a><h3 class="pHeading2">
Fields
</h3>
<a name="wp263463"> </a><h4 class="pHeading3">
TYPE_ARCFOUR
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">TYPE_ARCFOUR</b><a name="wp263465"> </a>
</pre></div>
<a name="wp263467"> </a><p class="pIndented1">
Indicates an ARCfour key type.
</p>
<a name="wp263475"> </a><h4 class="pHeading3">
TYPE_RSA_PRIVATE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">TYPE_RSA_PRIVATE</b><a name="wp263477"> </a>
</pre></div>
<a name="wp263479"> </a><p class="pIndented1">
Indicates an RSA private key type.
</p>
<a name="wp263487"> </a><h4 class="pHeading3">
TYPE_RSA_PUBLIC
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">TYPE_RSA_PUBLIC</b><a name="wp263489"> </a>
</pre></div>
<a name="wp263491"> </a><p class="pIndented1">
Indicates an RSA public key type.
</p>
<a name="wp263493"> </a><h3 class="pHeading2">
Constructors
</h3>
<a name="wp263501"> </a><h4 class="pHeading3">
KeyBuilder()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <b class="cBold">KeyBuilder</b>()<a name="wp263503"> </a>
</pre></div>
<a name="wp263505"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp263513"> </a><h4 class="pHeading3">
buildKey(byte, short, boolean)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.Key <b class="cBold">buildKey</b>(byte kType, short&#160;kLen, boolean&#160;kEnc) throws&#160;CryptoException<a name="wp263517"> </a>
</pre></div>
<a name="wp263519"> </a><p class="pIndented1">
Creates cryptographic keys of the specified type and length. For now, the third argument is ignored &#8212;- it is included here only for compatibility with the javacard.security.KeyBuilder class. Note that the object returned by this method must be cast to their appropriate key type interface.
</p>
<a name="wp263521"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263523"> </a><p class="pIndented2">
<code class="cCode">kType</code> - type of key to be generated
</p>
<a name="wp263525"> </a><p class="pIndented2">
<code class="cCode">kLen</code> - the desired size of the key in bits
</p>
<a name="wp263527"> </a><p class="pIndented2">
<code class="cCode">kEnc</code> - this parameter is ignored
</p>
<a name="wp263529"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263531"> </a><p class="pIndented2">
a key with the specified attributes
</p>
<a name="wp263533"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp263537"> </a><p class="pIndented2">
CryptoException - with the NO_SUCH_ALGORITHM reason code if the requested key type is not supported.
</p>
<a name="wp263539"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263547"> </a><h3 class="pHeading2">
MessageDigest
</h3>
<a name="wp263549"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public abstract class <span class="cUserType">MessageDigest</span><a name="wp263551"> </a>
 <a name="wp263553"> </a>
<code class="cCode">java.lang.Object</code><a name="wp263555"> </a>
&#160;&#160;|<a name="wp263557"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.MessageDigest</b><a name="wp263559"> </a>
</pre></div>
<a name="wp263561"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263563"> </a><p class="pBody">
Implements an abstract class that generalizes all message digests. It is modelled after javacard.security.MessageDigest. This version of the implementation only supports ALG_MD5 (which produces a 16-byte hash as described in RFC 2313) and ALG_SHA (which produces a 20-byte hash using NIST&#8217;s SHA1 algorithm). MD2, a predecessor to MD5, is not supported.
</p>
<a name="wp263566"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the fields and methods of this class. The left column gives the type, while the right column gives the field name or method signature, and a description. The rows that span columns are headers." id="wp261266">
  <caption><a name="wp261266"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261132"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261138"> </a><div style="text-align: left" class="pTableHead">
Fields
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261144"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_MD2<a name="wp261148"> </a>
</pre></div>
<a name="wp261150"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates the MD2 message digest algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261156"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_MD5<a name="wp261160"> </a>
</pre></div>
<a name="wp261162"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates the MD5 message digest algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261168"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_SHA<a name="wp261172"> </a>
</pre></div>
<a name="wp261174"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates the SHA message digest algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261180"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract java.lang.Object<a name="wp261186"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
clone()<a name="wp261190"> </a>
</pre></div>
<a name="wp261192"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Clones the MessageDigest object.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract short<a name="wp261198"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
doFinal(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)<a name="wp261202"> </a>
</pre></div>
<a name="wp261204"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Generates a hash of all/last input data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract byte<a name="wp261210"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getAlgorithm()<a name="wp261214"> </a>
</pre></div>
<a name="wp261216"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the message digest algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static MessageDigest<a name="wp261222"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getInstance(byte alg, boolean ext)<a name="wp261226"> </a>
</pre></div>
<a name="wp261228"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Creates a MessageDigest object instance of the specified algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract byte<a name="wp261234"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getLength()<a name="wp261238"> </a>
</pre></div>
<a name="wp261240"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the length (in bytes) of the hash.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261246"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
reset()<a name="wp261250"> </a>
</pre></div>
<a name="wp261252"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Resets the MessageDigest to the initial state for further use.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261258"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
update(byte[] inBuf, int inOff, int inLen)<a name="wp261262"> </a>
</pre></div>
<a name="wp261264"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Accumulates a hash of the input data.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263569"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists the methods this class inherits; the first two rows are headers." id="wp261283">
  <caption><a name="wp261283"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261273"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261277"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">toString()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp261281"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263571"> </a><h3 class="pHeading2">
Fields
</h3>
<a name="wp263579"> </a><h4 class="pHeading3">
ALG_MD2
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_MD2</b><a name="wp263581"> </a>
</pre></div>
<a name="wp263583"> </a><p class="pIndented1">
Indicates the MD2 message digest algorithm.
</p>
<a name="wp263591"> </a><h4 class="pHeading3">
ALG_MD5
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_MD5</b><a name="wp263593"> </a>
</pre></div>
<a name="wp263595"> </a><p class="pIndented1">
Indicates the MD5 message digest algorithm.
</p>
<a name="wp263603"> </a><h4 class="pHeading3">
ALG_SHA
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_SHA</b><a name="wp263605"> </a>
</pre></div>
<a name="wp263607"> </a><p class="pIndented1">
Indicates the SHA message digest algorithm.
</p>
<a name="wp263609"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp263617"> </a><h4 class="pHeading3">
clone()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract <code class="cCode">java.lang.Object</code> <b class="cBold">clone</b>()<a name="wp263619"> </a>
</pre></div>
<a name="wp263621"> </a><p class="pIndented1">
Clones the MessageDigest object.
</p>
<a name="wp263623"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263625"> </a><p class="pIndented2">
a clone of this object
</p>
<a name="wp263633"> </a><h4 class="pHeading3">
doFinal(byte[], int, int, byte[], int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract short <b class="cBold">doFinal</b>(byte[] inBuf, int&#160;inOff, int&#160;inLen, byte[]&#160;outBuf, int&#160;outOff)<a name="wp263635"> </a>
</pre></div>
<a name="wp263637"> </a><p class="pIndented1">
Generates a hash of all/last input data. Completes and returns the hash computation after performing final operations such as padding. The MessageDigest object is reset after this call.
</p>
<a name="wp263639"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263641"> </a><p class="pIndented2">
<code class="cCode">inBuf</code> - input buffer of data to be hashed
</p>
<a name="wp263643"> </a><p class="pIndented2">
<code class="cCode">inOff</code> - offset within inBuf where input data begins
</p>
<a name="wp263645"> </a><p class="pIndented2">
<code class="cCode">inLen</code> - length (in bytes) of data to be hashed
</p>
<a name="wp263647"> </a><p class="pIndented2">
<code class="cCode">outBuf</code> - output buffer where the hash should be placed
</p>
<a name="wp263649"> </a><p class="pIndented2">
<code class="cCode">outOff</code> - offset within outBuf where the resulting hash begins
</p>
<a name="wp263651"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263653"> </a><p class="pIndented2">
number of bytes of hash left in outBuf
</p>
<a name="wp263661"> </a><h4 class="pHeading3">
getAlgorithm()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract byte <b class="cBold">getAlgorithm</b>()<a name="wp263663"> </a>
</pre></div>
<a name="wp263665"> </a><p class="pIndented1">
Gets the message digest algorithm.
</p>
<a name="wp263667"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263669"> </a><p class="pIndented2">
algorithm implemented by this MessageDigest object
</p>
<a name="wp263677"> </a><h4 class="pHeading3">
getInstance(byte, boolean)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.MessageDigest <b class="cBold">getInstance</b>(byte alg, boolean&#160;ext)throws&#160;CryptoException<a name="wp263681"> </a>
</pre></div>
<a name="wp263683"> </a><p class="pIndented1">
Creates a MessageDigest object instance of the specified algorithm. The second parameter is ignored for now &#8212;- it is here only for compatibility with the javacard.security.MessageDigest class.
</p>
<a name="wp263685"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263687"> </a><p class="pIndented2">
<code class="cCode">alg</code> - the desired message digest algorithm, e.g. ALG_MD5
</p>
<a name="wp263689"> </a><p class="pIndented2">
<code class="cCode">ext</code> - ignored
</p>
<a name="wp263691"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263693"> </a><p class="pIndented2">
a MessageDigest object instance of the requested algorithm
</p>
<a name="wp263695"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp263699"> </a><p class="pIndented2">
CryptoException - with NO_SUCH_ALGORITHM reason code if the requested algorithm is not supported.
</p>
<a name="wp263707"> </a><h4 class="pHeading3">
getLength()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract byte <b class="cBold">getLength</b>()<a name="wp263709"> </a>
</pre></div>
<a name="wp263711"> </a><p class="pIndented1">
Gets the length (in bytes) of the hash.
</p>
<a name="wp263713"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263715"> </a><p class="pIndented2">
byte-length of the hash produced by this object
</p>
<a name="wp263723"> </a><h4 class="pHeading3">
reset()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">reset</b>()<a name="wp263725"> </a>
</pre></div>
<a name="wp263727"> </a><p class="pIndented1">
Resets the MessageDigest to the initial state for further use.
</p>
<a name="wp263735"> </a><h4 class="pHeading3">
update(byte[], int, int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">update</b>(byte[] inBuf, int&#160;inOff, int&#160;inLen)<a name="wp263737"> </a>
</pre></div>
<a name="wp263739"> </a><p class="pIndented1">
Accumulates a hash of the input data. This method is useful when the input data to be hashed is not available in one byte array.
</p>
<a name="wp263741"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263743"> </a><p class="pIndented2">
<code class="cCode">inBuf</code> - input buffer of data to be hashed
</p>
<a name="wp263745"> </a><p class="pIndented2">
<code class="cCode">inOff</code> - offset within inBuf where input data begins
</p>
<a name="wp263747"> </a><p class="pIndented2">
<code class="cCode">inLen</code> - length (in bytes) of data to be hashed
</p>
<a name="wp263749"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp263753"> </a><p class="pIndented1">
doFinal(byte[], int, int, byte[], int)
</p>
<a name="wp263755"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263763"> </a><h3 class="pHeading2">
PrivateKey
</h3>
<a name="wp263765"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public interface<span class="cUserType"> PrivateKey extends </span>Key<a name="wp263769"> </a>
</pre></div>
<a name="wp263771"> </a><h4 class="pHeading3">
All Superinterfaces:
</h4>
<a name="wp263775"> </a><p class="pIndented1">
Key
</p>
<a name="wp263777"> </a><h4 class="pHeading3">
All Known Subinterfaces:
</h4>
<a name="wp263781"> </a><p class="pIndented1">
RSAPrivateKey
</p>
<a name="wp263783"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263785"> </a><p class="pBody">
The PrivateKey abstract class is the base class for all private keys used in asymmetric algorithms.
</p>
<a name="wp263788"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp261310">
  <caption><a name="wp261310"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261288"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261294"> </a><div style="text-align: left" class="pTableHead">
Methods&nbsp;inherited&nbsp;from&nbsp;interface&nbsp;Key
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted">
          <pre class="pPreformatted">
clearKey(), 
getSize(),
getType(),
isInitialized(),
toString()<a name="wp261308"> </a>
</pre>
        </div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263790"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263798"> </a><h3 class="pHeading2">
PublicKey
</h3>
<a name="wp263800"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public interface<span class="cUserType"> PublicKey extends </span>Key<a name="wp263804"> </a>
</pre></div>
<a name="wp263806"> </a><h4 class="pHeading3">
All Superinterfaces:
</h4>
<a name="wp263810"> </a><p class="pIndented1">
Key
</p>
<a name="wp263812"> </a><h4 class="pHeading3">
All Known Subinterfaces:
</h4>
<a name="wp263816"> </a><p class="pIndented1">
RSAPublicKey
</p>
<a name="wp263818"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263820"> </a><p class="pBody">
The PublicKey abstract class is the base class for all public keys used in asymmetric algorithms.
</p>
<a name="wp263823"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp261337">
  <caption><a name="wp261337"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261315"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261321"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from interface Key
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
clearKey(), getSize(), getType(), isInitialized(), toString()<a name="wp261335"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263825"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263833"> </a><h3 class="pHeading2">
RandomData
</h3>
<a name="wp263835"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public abstract class <span class="cUserType">RandomData</span><a name="wp263837"> </a>
 <a name="wp263839"> </a>
java.lang.Object<a name="wp263841"> </a>
&#160;&#160;|<a name="wp263843"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.RandomData</b><a name="wp263845"> </a>
</pre></div>
<a name="wp263847"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263849"> </a><p class="pBody">
Implements an abstract class that generalizes random number generators.
</p>
<a name="wp263852"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the fields and methods of this class. The left column gives the type, while the right column gives the field name or method signature, and a description. The rows that span columns are headers." id="wp261418">
  <caption><a name="wp261418"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261344"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261350"> </a><div style="text-align: left" class="pTableHead">
Fields
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261356"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_PSEUDO_RANDOM<a name="wp261360"> </a>
</pre></div>
<a name="wp261362"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Identifies a utility pseudo random number generation algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261368"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_SECURE_RANDOM<a name="wp261372"> </a>
</pre></div>
<a name="wp261374"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Identifies a cryptographically secure random number generation algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261380"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261386"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
generateData(byte[] buf, short off, short len)<a name="wp261390"> </a>
</pre></div>
<a name="wp261392"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Generates random data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static RandomData<a name="wp261398"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getInstance(byte alg)<a name="wp261402"> </a>
</pre></div>
<a name="wp261404"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Creates a RandomData instance of the selected algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261410"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setSeed(byte[] buf, short off, short len)<a name="wp261414"> </a>
</pre></div>
<a name="wp261416"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Seeds the random number generator.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263855"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists methods that this class inherits; the first 2 rows are headers." id="wp261435">
  <caption><a name="wp261435"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261425"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261429"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">toString()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp261433"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263857"> </a><h3 class="pHeading2">
Fields
</h3>
<a name="wp263865"> </a><h4 class="pHeading3">
ALG_PSEUDO_RANDOM
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_PSEUDO_RANDOM</b><a name="wp263867"> </a>
</pre></div>
<a name="wp263869"> </a><p class="pIndented1">
Identifies a utility pseudo random number generation algorithm.
</p>
<a name="wp263877"> </a><h4 class="pHeading3">
ALG_SECURE_RANDOM
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_SECURE_RANDOM</b><a name="wp263879"> </a>
</pre></div>
<a name="wp263881"> </a><p class="pIndented1">
Identifies a cryptographically secure random number generation algorithm.
</p>
<a name="wp263883"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp263891"> </a><h4 class="pHeading3">
generateData(byte[], short, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">generateData</b>(byte[] buf, short&#160;off, short&#160;len)<a name="wp263893"> </a>
</pre></div>
<a name="wp263895"> </a><p class="pIndented1">
Generates random data. <br />
</p>
<a name="wp263897"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263899"> </a><p class="pIndented2">
<code class="cCode">buf</code> - output buffer in which the random data is to be placed
</p>
<a name="wp263901"> </a><p class="pIndented2">
<code class="cCode">off</code> - starting offset within buf for the random data
</p>
<a name="wp263903"> </a><p class="pIndented2">
<code class="cCode">len</code> - number of bytes of random data to be placed in buf
</p>
<a name="wp263911"> </a><h4 class="pHeading3">
getInstance(byte)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.RandomData <b class="cBold">getInstance</b>(byte alg)throws&#160;CryptoException<a name="wp263915"> </a>
</pre></div>
<a name="wp263917"> </a><p class="pIndented1">
Creates a RandomData instance of the selected algorithm. <br />
</p>
<a name="wp263919"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263921"> </a><p class="pIndented2">
<code class="cCode">alg</code> - the desired random number generation algorithm, e.g. ALG_PSEUDO_RANDOM
</p>
<a name="wp263923"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp263925"> </a><p class="pIndented2">
a RandomData instance implementing the selected algorithm.
</p>
<a name="wp263927"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp263931"> </a><p class="pIndented2">
CryptoException - with reason code set to NO_SUCH_ALGORITHM if an unsupported algorithm is requested. 
</p>
<a name="wp263933"> </a><p class="pIndented2">
<b class="cBold">WARNING:</b> Requests for a secure random number generator are currently redirected to a class that implements a weakly unpredictable source of random data. Licensees of this reference implementation are strongly urged to link requests for ALG_SECURE_RANDOM to better generators that may be available on their specific platforms.
</p>
<a name="wp263941"> </a><h4 class="pHeading3">
setSeed(byte[], short, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">setSeed</b>(byte[] buf, short&#160;off, short&#160;len)<a name="wp263943"> </a>
</pre></div>
<a name="wp263945"> </a><p class="pIndented1">
Seeds the random number generator. <br />
</p>
<a name="wp263947"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp263949"> </a><p class="pIndented2">
<code class="cCode">buf</code> - input buffer containing the seed
</p>
<a name="wp263951"> </a><p class="pIndented2">
<code class="cCode">off</code> - offset within buf where the seed starts
</p>
<a name="wp263953"> </a><p class="pIndented2">
<code class="cCode">len</code> - number of bytes of seed data in buf
</p>
<a name="wp263955"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp263963"> </a><h3 class="pHeading2">
RSAPrivateKey
</h3>
<a name="wp263965"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public interface<span class="cUserType"> RSAPrivateKey extends </span>PrivateKey<a name="wp263969"> </a>
</pre></div>
<a name="wp263971"> </a><h4 class="pHeading3">
All Superinterfaces:
</h4>
<a name="wp263977"> </a><p class="pIndented1">
Key, PrivateKey
</p>
<a name="wp263979"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp263981"> </a><p class="pBody">
Specifies the RSA private key interface. An RSA key is not ready for us until both the modulus and exponent have been set.
</p>
<a name="wp263984"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the  methods of this class. The left column gives the type, while the right column gives the  method signature and a description. The rows that span columns are headers." id="wp261510">
  <caption><a name="wp261510"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261442"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261448"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 boolean<a name="wp261454"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
equals(RSAPrivateKey k)<a name="wp261458"> </a>
</pre></div>
<a name="wp261460"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if this RSAPrivateKey has the same exponent and modulus as the specified key.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 short<a name="wp261466"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getExponent(byte[] buf, short offset)<a name="wp261470"> </a>
</pre></div>
<a name="wp261472"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the private exponent value of the key in the specified buffer.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 short<a name="wp261478"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getModulus(byte[] buf, short offset)<a name="wp261482"> </a>
</pre></div>
<a name="wp261484"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the modulus value of the key in the specified buffer.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261490"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setExponent(byte[] buf, short offset, short len)<a name="wp261494"> </a>
</pre></div>
<a name="wp261496"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Sets the private exponent value of the key.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261502"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setModulus(byte[] buf, short offset, short len)<a name="wp261506"> </a>
</pre></div>
<a name="wp261508"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Sets the modulus value of the key.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263987"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists inherited methods; the first two rows are headers." id="wp261539">
  <caption><a name="wp261539"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261517"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261523"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from interface Key
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
clearKey(), getSize(), getType(), isInitialized(), toString()<a name="wp261537"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp263989"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp263997"> </a><h4 class="pHeading3">
equals(RSAPrivateKey)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public boolean <b class="cBold">equals</b>(com.sun.midp.ssl.RSAPrivateKey k)<a name="wp264001"> </a>
</pre></div>
<a name="wp264003"> </a><p class="pIndented1">
Checks if this RSAPrivateKey has the same exponent and modulus as the specified key.
</p>
<a name="wp264005"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264007"> </a><p class="pIndented2">
<code class="cCode">k</code> - an RSAPrivateKey against which this key is to be compared
</p>
<a name="wp264009"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264011"> </a><p class="pIndented2">
true if the two keys have the same exponent and modulus, false otherwise
</p>
<a name="wp264019"> </a><h4 class="pHeading3">
getExponent(byte[], short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public short <b class="cBold">getExponent</b>(byte[] buf, short&#160;offset)<a name="wp264021"> </a>
</pre></div>
<a name="wp264023"> </a><p class="pIndented1">
Returns the private exponent value of the key in the specified buffer. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264025"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264027"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the output buffer where the exponent is placed
</p>
<a name="wp264029"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the exponent starts
</p>
<a name="wp264031"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264033"> </a><p class="pIndented2">
byte length of the exponent copied into buf
</p>
<a name="wp264035"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264039"> </a><p class="pIndented2">
setExponent(byte[], short, short)
</p>
<a name="wp264047"> </a><h4 class="pHeading3">
getModulus(byte[], short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public short <b class="cBold">getModulus</b>(byte[] buf, short&#160;offset)<a name="wp264049"> </a>
</pre></div>
<a name="wp264051"> </a><p class="pIndented1">
Returns the modulus value of the key in the specified buffer. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264053"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264055"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the output buffer where the modulus is placed
</p>
<a name="wp264057"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the modulus starts
</p>
<a name="wp264059"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264061"> </a><p class="pIndented2">
byte length of the modulus copied into buf
</p>
<a name="wp264063"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264067"> </a><p class="pIndented2">
setModulus(byte[], short, short)
</p>
<a name="wp264075"> </a><h4 class="pHeading3">
setExponent(byte[], short, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">setExponent</b>(byte[] buf, short&#160;offset, short&#160;len)throws&#160;CryptoException<a name="wp264077"> </a>
</pre></div>
<a name="wp264079"> </a><p class="pIndented1">
Sets the private exponent value of the key. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264081"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264083"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the input buffer containing the exponent
</p>
<a name="wp264085"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the exponent starts
</p>
<a name="wp264087"> </a><p class="pIndented2">
<code class="cCode">len</code> - exponent length in bytes
</p>
<a name="wp264089"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264093"> </a><p class="pIndented2">
CryptoException - with reason code set to ILLEGAL_VALUE if the specified exponent data is inconsistent with the key size.
</p>
<a name="wp264095"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264099"> </a><p class="pIndented2">
getExponent(byte[], short)
</p>
<a name="wp264107"> </a><h4 class="pHeading3">
setModulus(byte[], short, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">setModulus</b>(byte[] buf, short&#160;offset, short&#160;len)throws&#160;CryptoException<a name="wp264109"> </a>
</pre></div>
<a name="wp264111"> </a><p class="pIndented1">
Sets the modulus value of the key. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264113"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264115"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the input buffer containing the modulus
</p>
<a name="wp264117"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the modulus starts
</p>
<a name="wp264119"> </a><p class="pIndented2">
<code class="cCode">len</code> - modulus length in bytes
</p>
<a name="wp264121"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264125"> </a><p class="pIndented2">
CryptoException - with reason code set to ILLEGAL_VALUE if the specified modulus data is inconsistent with the key size.
</p>
<a name="wp264127"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264131"> </a><p class="pIndented2">
getModulus(byte[], short)
</p>
<a name="wp264133"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp264141"> </a><h3 class="pHeading2">
RSAPublicKey
</h3>
<a name="wp264143"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public interface<span class="cUserType"> RSAPublicKey extends </span>PublicKey<a name="wp264147"> </a>
</pre></div>
<a name="wp264149"> </a><h4 class="pHeading3">
All Superinterfaces:
</h4>
<a name="wp264155"> </a><p class="pIndented1">
Key, PublicKey
</p>
<a name="wp264157"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp264159"> </a><p class="pBody">
Specifies the RSA public key interface. An RSA key is not ready for us until both the modulus and exponent have been set.
</p>
<a name="wp264162"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the  methods of this class. The left column gives the type, while the right column gives the method signature, and a description. The rows that span columns are headers." id="wp261614">
  <caption><a name="wp261614"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261546"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261552"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 boolean<a name="wp261558"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
equals(RSAPublicKey k)<a name="wp261562"> </a>
</pre></div>
<a name="wp261564"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if this RSAPublicKey has the same exponent and modulus as the specified key.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 short<a name="wp261570"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getExponent(byte[] buf, short offset)<a name="wp261574"> </a>
</pre></div>
<a name="wp261576"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the public exponent value of the key in the specified buffer.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 short<a name="wp261582"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getModulus(byte[] buf, short offset)<a name="wp261586"> </a>
</pre></div>
<a name="wp261588"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the modulus value of the key in the specified buffer.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261594"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setExponent(byte[] buf, short offset, short len)<a name="wp261598"> </a>
</pre></div>
<a name="wp261600"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Sets the public exponent value of the key.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261606"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setModulus(byte[] buf, short offset, short len)<a name="wp261610"> </a>
</pre></div>
<a name="wp261612"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Sets the modulus value of the key.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264165"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp261643">
  <caption><a name="wp261643"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261621"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261627"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from interface Key
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
clearKey(), getSize(), getType(), isInitialized(), toString()<a name="wp261641"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264167"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp264175"> </a><h4 class="pHeading3">
equals(RSAPublicKey)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public boolean <b class="cBold">equals</b>(com.sun.midp.ssl.RSAPublicKey k)<a name="wp264179"> </a>
</pre></div>
<a name="wp264181"> </a><p class="pIndented1">
Checks if this RSAPublicKey has the same exponent and modulus as the specified key.
</p>
<a name="wp264183"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264185"> </a><p class="pIndented2">
<code class="cCode">k</code> - an RSAPublicKey against which this key is to be compared
</p>
<a name="wp264187"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264189"> </a><p class="pIndented2">
true if the two keys have the same exponent and modulus, false otherwise
</p>
<a name="wp264197"> </a><h4 class="pHeading3">
getExponent(byte[], short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public short <b class="cBold">getExponent</b>(byte[] buf, short&#160;offset)<a name="wp264199"> </a>
</pre></div>
<a name="wp264201"> </a><p class="pIndented1">
Returns the public exponent value of the key in the specified buffer. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264203"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264205"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the output buffer where the exponent is placed
</p>
<a name="wp264207"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the exponent starts
</p>
<a name="wp264209"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264211"> </a><p class="pIndented2">
byte length of the exponent copied into buf
</p>
<a name="wp264213"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264217"> </a><p class="pIndented2">
setExponent(byte[], short, short)
</p>
<a name="wp264225"> </a><h4 class="pHeading3">
getModulus(byte[], short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public short <b class="cBold">getModulus</b>(byte[] buf, short&#160;offset)<a name="wp264227"> </a>
</pre></div>
<a name="wp264229"> </a><p class="pIndented1">
Returns the modulus value of the key in the specified buffer. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264231"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264233"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the output buffer where the modulus is placed
</p>
<a name="wp264235"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the modulus starts
</p>
<a name="wp264237"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264239"> </a><p class="pIndented2">
byte length of the modulus copied into buf
</p>
<a name="wp264241"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264245"> </a><p class="pIndented2">
setModulus(byte[], short, short)
</p>
<a name="wp264253"> </a><h4 class="pHeading3">
setExponent(byte[], short, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">setExponent</b>(byte[] buf, short&#160;offset, short&#160;len)throws&#160;CryptoException<a name="wp264255"> </a>
</pre></div>
<a name="wp264257"> </a><p class="pIndented1">
Sets the public exponent value of the key. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264259"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264261"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the input buffer containing the exponent
</p>
<a name="wp264263"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the exponent starts
</p>
<a name="wp264265"> </a><p class="pIndented2">
<code class="cCode">len</code> - exponent length in bytes
</p>
<a name="wp264267"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264271"> </a><p class="pIndented2">
CryptoException - with reason code set to ILLEGAL_VALUE if the specified exponent data is inconsistent with the key size.
</p>
<a name="wp264273"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264277"> </a><p class="pIndented2">
getExponent(byte[], short)
</p>
<a name="wp264285"> </a><h4 class="pHeading3">
setModulus(byte[], short, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">setModulus</b>(byte[] buf, short&#160;offset, short&#160;len)throws&#160;CryptoException<a name="wp264287"> </a>
</pre></div>
<a name="wp264289"> </a><p class="pIndented1">
Sets the modulus value of the key. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of the last byte).
</p>
<a name="wp264291"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264293"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the input buffer containing the modulus
</p>
<a name="wp264295"> </a><p class="pIndented2">
<code class="cCode">offset</code> - offset within buf where the modulus starts
</p>
<a name="wp264297"> </a><p class="pIndented2">
<code class="cCode">len</code> - modulus length in bytes
</p>
<a name="wp264299"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264303"> </a><p class="pIndented2">
CryptoException - with reason code set to ILLEGAL_VALUE if the specified modulus data is inconsistent with the key size.
</p>
<a name="wp264305"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264309"> </a><p class="pIndented2">
getModulus(byte[], short)
</p>
<a name="wp264311"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp264319"> </a><h3 class="pHeading2">
SecretKey
</h3>
<a name="wp264321"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public final class <span class="cUserType">SecretKey</span> implements Key<a name="wp264325"> </a>
 <a name="wp264327"> </a>
<code class="cCode">java.lang.Object</code><a name="wp264329"> </a>
&#160;&#160;|<a name="wp264331"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.SecretKey</b><a name="wp264333"> </a>
</pre></div>
<a name="wp264335"> </a><h4 class="pHeading3">
All Implemented Interfaces:
</h4>
<a name="wp264339"> </a><p class="pIndented1">
Key
</p>
<a name="wp264341"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp264343"> </a><p class="pBody">
Implements the base interface for keys used in symmetric algorithms.
</p>
<a name="wp264346"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the methods of this class. The left column gives the type, while the right column gives the method signature, and a description. The rows that span columns are headers." id="wp261742">
  <caption><a name="wp261742"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261650"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261656"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261662"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
clearKey()<a name="wp261666"> </a>
</pre></div>
<a name="wp261668"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Clears the key and sets it to uninitialized state.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 byte<a name="wp261674"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getKey(byte[] buf, short off)<a name="wp261678"> </a>
</pre></div>
<a name="wp261680"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the key data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 short<a name="wp261686"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSize()<a name="wp261690"> </a>
</pre></div>
<a name="wp261692"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the key size in bits.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 byte<a name="wp261698"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getType()<a name="wp261702"> </a>
</pre></div>
<a name="wp261704"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the key type.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 boolean<a name="wp261710"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
isInitialized()<a name="wp261714"> </a>
</pre></div>
<a name="wp261716"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if the key is initialized.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261722"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setKey(byte[] buf, short off)<a name="wp261726"> </a>
</pre></div>
<a name="wp261728"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Sets the key data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp261734"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
toString()<a name="wp261738"> </a>
</pre></div>
<a name="wp261740"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Converts the key to its corresponding human readable string representation.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264349"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp261759">
  <caption><a name="wp261759"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261749"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261753"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp261757"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264351"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp264359"> </a><h4 class="pHeading3">
clearKey()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">clearKey</b>()<a name="wp264361"> </a>
</pre></div>
<a name="wp264363"> </a><p class="pIndented1">
Clears the key and sets it to uninitialized state.
</p>
<a name="wp264365"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp264371"> </a><p class="pIndented2">
clearKey in interface Key
</p>
<a name="wp264379"> </a><h4 class="pHeading3">
getKey(byte[], short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public byte <b class="cBold">getKey</b>(byte[] buf, short&#160;off)<a name="wp264381"> </a>
</pre></div>
<a name="wp264383"> </a><p class="pIndented1">
Gets the key data. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).
</p>
<a name="wp264385"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264387"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the output buffer in which key data is to be placed
</p>
<a name="wp264389"> </a><p class="pIndented2">
<code class="cCode">off</code> - starting offset within buf for the key data.
</p>
<a name="wp264391"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264393"> </a><p class="pIndented2">
number of bytes of key data placed in buf.
</p>
<a name="wp264395"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264399"> </a><p class="pIndented2">
setKey(byte[], short)
</p>
<a name="wp264407"> </a><h4 class="pHeading3">
getSize()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public short <b class="cBold">getSize</b>()<a name="wp264409"> </a>
</pre></div>
<a name="wp264411"> </a><p class="pIndented1">
Gets the key size in bits.
</p>
<a name="wp264413"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp264419"> </a><p class="pIndented2">
getSize in interface Key
</p>
<a name="wp264421"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264423"> </a><p class="pIndented2">
the key size in bits
</p>
<a name="wp264431"> </a><h4 class="pHeading3">
getType()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public byte <b class="cBold">getType</b>()<a name="wp264433"> </a>
</pre></div>
<a name="wp264435"> </a><p class="pIndented1">
Gets the key type.
</p>
<a name="wp264437"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp264443"> </a><p class="pIndented2">
getType in interface Key
</p>
<a name="wp264445"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264447"> </a><p class="pIndented2">
the key type
</p>
<a name="wp264455"> </a><h4 class="pHeading3">
isInitialized()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public boolean <b class="cBold">isInitialized</b>()<a name="wp264457"> </a>
</pre></div>
<a name="wp264459"> </a><p class="pIndented1">
Checks if the key is initialized.
</p>
<a name="wp264461"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp264467"> </a><p class="pIndented2">
isInitialized in interface Key
</p>
<a name="wp264469"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264471"> </a><p class="pIndented2">
true if the key has been initialized, false otherwise
</p>
<a name="wp264479"> </a><h4 class="pHeading3">
setKey(byte[], short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">setKey</b>(byte[] buf, short&#160;off)throws&#160;CryptoException<a name="wp264481"> </a>
</pre></div>
<a name="wp264483"> </a><p class="pIndented1">
Sets the key data. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).
</p>
<a name="wp264485"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264487"> </a><p class="pIndented2">
<code class="cCode">buf</code> - the input buffer containing key data
</p>
<a name="wp264489"> </a><p class="pIndented2">
<code class="cCode">off</code> - starting offset within buf for the key data.
</p>
<a name="wp264491"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264495"> </a><p class="pIndented2">
CryptoException - with reason code set to ILLEGAL_VALUE if the specified secret data is inconsistent with the key size.
</p>
<a name="wp264497"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264501"> </a><p class="pIndented2">
getKey(byte[], short)
</p>
<a name="wp264509"> </a><h4 class="pHeading3">
toString()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">toString</b>()<a name="wp264511"> </a>
</pre></div>
<a name="wp264513"> </a><p class="pIndented1">
Converts the key to its corresponding human readable string representation.
</p>
<a name="wp264515"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp264521"> </a><p class="pIndented2">
toString in interface Key
</p>
<a name="wp264523"> </a><h5 class="pHeading4Indented">
Overrides:
</h5>
<a name="wp264525"> </a><p class="pIndented2">
<code class="cCode">toString</code> in class <code class="cCode">Object</code>
</p>
<a name="wp264527"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264529"> </a><p class="pIndented2">
a string representation of the secret key
</p>
<a name="wp264531"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp264539"> </a><h3 class="pHeading2">
Signature
</h3>
<a name="wp264541"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public abstract class <span class="cUserType">Signature</span><a name="wp264543"> </a>
 <a name="wp264545"> </a>
<code class="cCode">java.lang.Object</code><a name="wp264547"> </a>
&#160;&#160;|<a name="wp264549"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.Signature</b><a name="wp264551"> </a>
</pre></div>
<a name="wp264553"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp264555"> </a><p class="pBody">
Implements an abstract class that generalizes all signature algorithms. This version of the implementation only supports ALG_RSA_MD5_PKCS1 and ALG_RSA_SHA_PKCS1.
</p>
<a name="wp264558"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the fields and methods of this class. The left column gives the type, while the right column gives the field name or method signature, and a description. The rows that span columns are headers." id="wp261924">
  <caption><a name="wp261924"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261766"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261772"> </a><div style="text-align: left" class="pTableHead">
Fields
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261778"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_RSA_MD5_PKCS1<a name="wp261782"> </a>
</pre></div>
<a name="wp261784"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Signature algorithm ALG_RSA_MD5_PKCS1 encrypts the 16-byte MD5 digest using RSA.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261790"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ALG_RSA_SHA_PKCS1<a name="wp261794"> </a>
</pre></div>
<a name="wp261796"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Signature algorithm ALG_RSA_SHA_PKCS1 encrypts the 20-byte SHA digest using RSA.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261802"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
MODE_SIGN<a name="wp261806"> </a>
</pre></div>
<a name="wp261808"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Used in init() methods to indicate signature sign mode.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp261814"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
MODE_VERIFY<a name="wp261818"> </a>
</pre></div>
<a name="wp261820"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Used in init() methods to indicate signature verify mode.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261826"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract byte<a name="wp261832"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getAlgorithm()<a name="wp261836"> </a>
</pre></div>
<a name="wp261838"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the signature algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static Signature<a name="wp261844"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getInstance(byte alg, boolean ext)<a name="wp261848"> </a>
</pre></div>
<a name="wp261850"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Creates a <code class="cCode">Signature</code> object instance of the selected algorithm.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract short<a name="wp261856"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getLength()<a name="wp261860"> </a>
</pre></div>
<a name="wp261862"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the byte length of the signature data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261868"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
init(Key theKey, byte theMode)<a name="wp261872"> </a>
</pre></div>
<a name="wp261874"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Initializes the <code class="cCode">Signature</code> object with the appropriate <code class="cCode">Key</code> for signature creation or verification.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261880"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
init(Key theKey, byte theMode, byte[] b, int off, int len)<a name="wp261884"> </a>
</pre></div>
<a name="wp261886"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Initializes the <code class="cCode">Signature</code> object with the appropriate <code class="cCode">Key</code> and algorithm specific parameters for signature creation or verification.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract short<a name="wp261892"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
sign(byte[] inBuf, int inOff, int inLen, byte[] sigBuf, int sigOff)<a name="wp261896"> </a>
</pre></div>
<a name="wp261898"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Generates the signature of all/last input data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract void<a name="wp261904"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
update(byte[] inBuf, int inOff, int inLen)<a name="wp261908"> </a>
</pre></div>
<a name="wp261910"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Accumulates a signature of the input data.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
abstract boolean<a name="wp261916"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
verify(byte[] inBuf, int inOff, int inLen, byte[] sigBuf, int sigOff, short sigLen)<a name="wp261920"> </a>
</pre></div>
<a name="wp261922"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Verifies the signature of all/last input data against the passed in signature.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264561"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp261941">
  <caption><a name="wp261941"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp261931"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp261935"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">toString()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp261939"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264563"> </a><h3 class="pHeading2">
Fields
</h3>
<a name="wp264571"> </a><h4 class="pHeading3">
ALG_RSA_MD5_PKCS1
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_RSA_MD5_PKCS1</b><a name="wp264573"> </a>
</pre></div>
<a name="wp264575"> </a><p class="pIndented1">
Signature algorithm ALG_RSA_MD5_PKCS1 encrypts the 16-byte MD5 digest using RSA. The digest is padded according to the PKCS#1 (v1.5) scheme.
</p>
<a name="wp264583"> </a><h4 class="pHeading3">
ALG_RSA_SHA_PKCS1
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">ALG_RSA_SHA_PKCS1</b><a name="wp264585"> </a>
</pre></div>
<a name="wp264587"> </a><p class="pIndented1">
Signature algorithm ALG_RSA_SHA_PKCS1 encrypts the 20-byte SHA digest using RSA. The digest is padded according to the PKCS#1 (v1.5) scheme.
</p>
<a name="wp264595"> </a><h4 class="pHeading3">
MODE_SIGN
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">MODE_SIGN</b><a name="wp264597"> </a>
</pre></div>
<a name="wp264599"> </a><p class="pIndented1">
Used in init() methods to indicate signature sign mode.
</p>
<a name="wp264607"> </a><h4 class="pHeading3">
MODE_VERIFY
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">MODE_VERIFY</b><a name="wp264609"> </a>
</pre></div>
<a name="wp264611"> </a><p class="pIndented1">
Used in init() methods to indicate signature verify mode.
</p>
<a name="wp264613"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp264621"> </a><h4 class="pHeading3">
getAlgorithm()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract byte <b class="cBold">getAlgorithm</b>()<a name="wp264623"> </a>
</pre></div>
<a name="wp264625"> </a><p class="pIndented1">
Gets the signature algorithm.
</p>
<a name="wp264627"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264629"> </a><p class="pIndented2">
the algorithm code defined above
</p>
<a name="wp264637"> </a><h4 class="pHeading3">
getInstance(byte, boolean)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.Signature <b class="cBold">getInstance</b>(byte alg, boolean&#160;ext)throws&#160;CryptoException<a name="wp264641"> </a>
</pre></div>
<a name="wp264643"> </a><p class="pIndented1">
Creates a <code class="cCode">Signature</code> object instance of the selected algorithm. 
</p>
<a name="wp264645"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264647"> </a><p class="pIndented2">
<code class="cCode">alg</code> - desired signature algorithm
</p>
<a name="wp264649"> </a><p class="pIndented2">
<code class="cCode">ext</code> - this parameter is here only for compatibility with <code class="cCode">javacard.security.Signature</code>, it is ignored
</p>
<a name="wp264651"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264653"> </a><p class="pIndented2">
a <code class="cCode">Signature</code> object instance of the requested algorithm
</p>
<a name="wp264655"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264659"> </a><p class="pIndented2">
CryptoException - with reason code <code class="cCode">NO_SUCH_ALGORITHM</code> if the requested algorithm is not supported
</p>
<a name="wp264667"> </a><h4 class="pHeading3">
getLength()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract short <b class="cBold">getLength</b>()<a name="wp264669"> </a>
</pre></div>
<a name="wp264671"> </a><p class="pIndented1">
Gets the byte length of the signature data.
</p>
<a name="wp264673"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264675"> </a><p class="pIndented2">
the byte length of signature data
</p>
<a name="wp264683"> </a><h4 class="pHeading3">
init(Key, byte)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">init</b>(com.sun.midp.ssl.Key theKey, byte&#160;theMode)throws&#160;CryptoException<a name="wp264687"> </a>
</pre></div>
<a name="wp264689"> </a><p class="pIndented1">
Initializes the <code class="cCode">Signature</code> object with the appropriate <code class="cCode">Key</code> for signature creation or verification. 
</p>
<a name="wp264691"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264693"> </a><p class="pIndented2">
<code class="cCode">theKey</code> - the key object to use for signing or verification
</p>
<a name="wp264695"> </a><p class="pIndented2">
<code class="cCode">theMode</code> - one of <code class="cCode">MODE_SIGN</code> or <code class="cCode">MODE_VERIFY</code>
</p>
<a name="wp264697"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264701"> </a><p class="pIndented2">
CryptoException - with reason code <code class="cCode">ILLEGAL_VALUE</code> if an invalid mode is specified or if the key type is inconsistent with the mode or signature implementation.
</p>
<a name="wp264709"> </a><h4 class="pHeading3">
init(Key, byte, byte[], int, int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">init</b>(com.sun.midp.ssl.Key theKey, byte&#160;theMode, byte[]&#160;b, int&#160;off, int&#160;len)throws&#160;CryptoException<a name="wp264713"> </a>
</pre></div>
<a name="wp264715"> </a><p class="pIndented1">
Initializes the <code class="cCode">Signature</code> object with the appropriate <code class="cCode">Key</code> and algorithm specific parameters for signature creation or verification. 
</p>
<a name="wp264717"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264719"> </a><p class="pIndented2">
<code class="cCode">theKey</code> - the key object to use for signing or verification
</p>
<a name="wp264721"> </a><p class="pIndented2">
<code class="cCode">theMode</code> - one of <code class="cCode">MODE_SIGN</code> or <code class="cCode">MODE_VERIFY</code>
</p>
<a name="wp264723"> </a><p class="pIndented2">
<code class="cCode">b</code> - byte array containing algorithm specific parameters
</p>
<a name="wp264725"> </a><p class="pIndented2">
<code class="cCode">off</code> - starting offset of parameter data within the byte array
</p>
<a name="wp264727"> </a><p class="pIndented2">
<code class="cCode">len</code> - byte length of parameter data
</p>
<a name="wp264729"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264733"> </a><p class="pIndented2">
CryptoException - with reason code <code class="cCode">ILLEGAL_VALUE</code> if an invalid mode is specified or if the key type is inconsistent with the mode or signature implementation or if this initialization mode is not supported by the signature algorithm
</p>
<a name="wp264741"> </a><h4 class="pHeading3">
sign(byte[], int, int, byte[], int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract short <b class="cBold">sign</b>(byte[] inBuf, int&#160;inOff, int&#160;inLen, byte[]&#160;sigBuf, int&#160;sigOff)throws&#160;CryptoException<a name="wp264743"> </a>
</pre></div>
<a name="wp264745"> </a><p class="pIndented1">
Generates the signature of all/last input data. A call to this method also resets this signature object to the state it was in when previously initialized via a call to init(). That is, the object is reset and available to sign another message. 
</p>
<a name="wp264747"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264749"> </a><p class="pIndented2">
<code class="cCode">inBuf</code> - the input buffer of data to be signed
</p>
<a name="wp264751"> </a><p class="pIndented2">
<code class="cCode">inOff</code> - starting offset within the input buffer for data to be signed
</p>
<a name="wp264753"> </a><p class="pIndented2">
<code class="cCode">inLen</code> - the byte length of data to be signed
</p>
<a name="wp264755"> </a><p class="pIndented2">
<code class="cCode">sigBuf</code> - the output buffer to store signature data
</p>
<a name="wp264757"> </a><p class="pIndented2">
<code class="cCode">sigOff</code> - starting offset within the output buffer at which to begin signature data
</p>
<a name="wp264759"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264761"> </a><p class="pIndented2">
number of bytes of signature output in sigBuf
</p>
<a name="wp264763"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264767"> </a><p class="pIndented2">
CryptoException - with the following reason codes: (i) <code class="cCode">UNINITIALIZED_KEY</code> if key is not initialized, (ii) <code class="cCode">INVALID_INIT</code> if signature object wasn not properly initialized, for signing (iii) <code class="cCode">ILLEGAL_USE</code> if the signature algorithm does not pad the message and the message is not block aligned
</p>
<a name="wp264775"> </a><h4 class="pHeading3">
update(byte[], int, int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract void <b class="cBold">update</b>(byte[] inBuf, int&#160;inOff, int&#160;inLen)throws&#160;CryptoException<a name="wp264777"> </a>
</pre></div>
<a name="wp264779"> </a><p class="pIndented1">
Accumulates a signature of the input data. When this method is used, temporary storage of intermediate results is required. This method should only be used if all the input data required for the signature is not available in one byte array. The sign() or verify() method is recommended whenever possible. 
</p>
<a name="wp264781"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264783"> </a><p class="pIndented2">
<code class="cCode">inBuf</code> - the input buffer of data to be signed
</p>
<a name="wp264785"> </a><p class="pIndented2">
<code class="cCode">inOff</code> - starting offset within the input buffer for data to be signed
</p>
<a name="wp264787"> </a><p class="pIndented2">
<code class="cCode">inLen</code> - the byte length of data to be signed
</p>
<a name="wp264789"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264793"> </a><p class="pIndented2">
CryptoException - with <code class="cCode">UNINITIALIZED_KEY</code> or <code class="cCode">INVALID_INIT</code> if the signature object is not properly initialized
</p>
<a name="wp264795"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp264801"> </a><p class="pIndented2">
sign(byte[], int, int, byte[], int), verify(byte[], int, int, byte[], int, short)
</p>
<a name="wp264809"> </a><h4 class="pHeading3">
verify(byte[], int, int, byte[], int, short)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public abstract boolean <b class="cBold">verify</b>(byte[] inBuf, int&#160;inOff, int&#160;inLen, byte[]&#160;sigBuf, int&#160;sigOff, short&#160;sigLen)throws&#160;CryptoException<a name="wp264811"> </a>
</pre></div>
<a name="wp264813"> </a><p class="pIndented1">
Verifies the signature of all/last input data against the passed in signature. A call to this method also resets this signature object to the state it was in when previously initialized via a call to init(). That is, the object is reset and available to verify another message. 
</p>
<a name="wp264815"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264817"> </a><p class="pIndented2">
<code class="cCode">inBuf</code> - the input buffer of data to be verified
</p>
<a name="wp264819"> </a><p class="pIndented2">
<code class="cCode">inOff</code> - starting offset within the input buffer for data to be verified
</p>
<a name="wp264821"> </a><p class="pIndented2">
<code class="cCode">inLen</code> - the byte length of data to be verified
</p>
<a name="wp264823"> </a><p class="pIndented2">
<code class="cCode">sigBuf</code> - the input buffer containing signature data
</p>
<a name="wp264825"> </a><p class="pIndented2">
<code class="cCode">sigOff</code> - starting offset within the sigBuf where signature data begins
</p>
<a name="wp264827"> </a><p class="pIndented2">
<code class="cCode">sigLen</code> - byte length of signature data
</p>
<a name="wp264829"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264831"> </a><p class="pIndented2">
true if signature verifies, false otherwise
</p>
<a name="wp264833"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264837"> </a><p class="pIndented2">
CryptoException - with the following reason codes: (i) <code class="cCode">UNINITIALIZED_KEY</code> if key is not initialized, (ii) <code class="cCode">INVALID_INIT</code> if signature object wasn not properly initialized, for verification (iii) <code class="cCode">ILLEGAL_USE</code> if the signature algorithm does not pad the message and the message is not block aligned
</p>
<a name="wp264839"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp264847"> </a><h3 class="pHeading2">
SSLStreamConnection
</h3>
<a name="wp264849"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public class <span class="cUserType">SSLStreamConnection</span> implements <code class="cCode">javax.microedition.io.StreamConnection</code><a name="wp264851"> </a>
 <a name="wp264853"> </a>
<code class="cCode">java.lang.Object</code><a name="wp264855"> </a>
&#160;&#160;|<a name="wp264857"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.SSLStreamConnection</b><a name="wp264859"> </a>
</pre></div>
<a name="wp264861"> </a><h4 class="pHeading3">
All Implemented Interfaces:
</h4>
<a name="wp264863"> </a><p class="pIndented1">
<code class="cCode">javax.microedition.io.Connection</code>, <code class="cCode">javax.microedition.io.InputConnection</code>, <code class="cCode">javax.microedition.io.OutputConnection</code>, <code class="cCode">javax.microedition.io.StreamConnection</code>
</p>
<a name="wp264865"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp264867"> </a><p class="pBody">
The SSLStreamConnection class implements the StreamConnection interface. Data exchanged through a SSLStreamConnection is automatically protected by SSL. Currently, only SSL version 3.0 is supported and the list of cipher suites proposed by the client is hard coded to {SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_EXPORT_WITH_RC4_40_MD5}. This version of the implementation does not support client authentication at the SSL layer &#8212;- a feature that is rarely used. Typical usage of this class by an application would be along the following lines: 
</p>
<div class="pPreformatted"><pre class="pPreformatted">
&#160;&#160;&#160;&#160;&#160;&#160;//&#160;create&#160;a&#160;TCP&#160;connection<a name="wp264869"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;StreamConnection&#160;t&#160;=&#160;<a name="wp264871"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Connector.open(&#8220;socket://www.server.com:443&#8221;);<a name="wp1035213"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;//&#160;Create&#160;an&#160;SSL&#160;connection<a name="wp264873"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;SSLStreamConnection&#160;s&#160;=&#160;<a name="wp264875"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;new&#160;SSLStreamConnection(&#8220;www.server.com&#8221;,&#160;443,<a name="wp1035214"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;t.openInputStream(),&#160;t.openOutputStream());<a name="wp264877"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;t.close();<a name="wp264879"> </a>
&#160;<a name="wp264881"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;//&#160;obtain&#160;the&#160;associated&#160;input/output&#160;streams<a name="wp264883"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;OutputStream&#160;sout&#160;=&#160;s.openOutputStream();<a name="wp264885"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;InputStream&#160;sin&#160;=&#160;s.openInputStream();<a name="wp264887"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;...<a name="wp264889"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;//&#160;send&#160;SSL-protected&#160;data&#160;by&#160;writing&#160;to&#160;sout&#160;and<a name="wp264891"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;//&#160;receive&#160;SSL-protected&#160;by&#160;reading&#160;from&#160;sin<a name="wp264893"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;...<a name="wp264895"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;sin.close();<a name="wp264897"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;sout.close();<a name="wp264899"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;s.close();&#160;&#160;&#160;//&#160;close&#160;the&#160;SSL&#160;connection&#160;when&#160;done<a name="wp264901"> </a>
</pre></div>
<a name="wp264906"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the constructors and methods of this class. The left column gives the type, while the right column gives the constructor or method signature, and a description. The rows that span columns are headers." id="wp262094">
  <caption><a name="wp262094"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp261948"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261954"> </a><div style="text-align: left" class="pTableHead">
Constructors
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
&#160;<a name="wp261960"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
SSLStreamConnection(java.lang.String host, int port, java.io.InputStream in, java.io.OutputStream out)<a name="wp261964"> </a>
</pre></div>
<a name="wp261966"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Establish and SSL session over a reliable stream.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp261972"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp261978"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
close()<a name="wp261982"> </a>
</pre></div>
<a name="wp261984"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Closes the SSL connection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 javax.microedition.io.SecurityInfo<a name="wp261990"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSecurityInfo()<a name="wp261994"> </a>
</pre></div>
<a name="wp261996"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the security information associated with this connection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 X509Certificate<a name="wp262002"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getServerCertificate()<a name="wp262006"> </a>
</pre></div>
<a name="wp262008"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the server certificate associated with this connection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static CertStore<a name="wp262014"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getTrustedCertStore()<a name="wp262018"> </a>
</pre></div>
<a name="wp262020"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the certificate store containing trusted root certificates used to verify SSL server certificate chains.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static void<a name="wp262026"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
lockTrustedCertStore()<a name="wp262030"> </a>
</pre></div>
<a name="wp262032"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Locks the current trusted certificate store so it cannot be changed.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.io.DataInputStream<a name="wp262038"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
openDataInputStream()<a name="wp262042"> </a>
</pre></div>
<a name="wp262044"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the DataInputStream associated with this SSLStreamConnection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.io.DataOutputStream<a name="wp262050"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
openDataOutputStream()<a name="wp262054"> </a>
</pre></div>
<a name="wp262056"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the DataOutputStream associated with this SSLStreamConnection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.io.InputStream<a name="wp262062"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
openInputStream()<a name="wp262066"> </a>
</pre></div>
<a name="wp262068"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the InputStream associated with this SSLStreamConnection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.io.OutputStream<a name="wp262074"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
openOutputStream()<a name="wp262078"> </a>
</pre></div>
<a name="wp262080"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns the OutputStream associated with this SSLStreamConnection.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static void<a name="wp262086"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
setTrustedCertStore(CertStore cs)<a name="wp262090"> </a>
</pre></div>
<a name="wp262092"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Sets the trusted certificate store which contains root certificates used to verify certificate chains sent by an SSL server.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264909"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp262111">
  <caption><a name="wp262111"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp262101"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp262105"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">toString()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp262109"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp264911"> </a><h3 class="pHeading2">
Constructors
</h3>
<a name="wp264919"> </a><h4 class="pHeading3">
SSLStreamConnection(String, int, InputStream, OutputStream)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <b class="cBold">SSLStreamConnection</b>(<code class="cCode">java.lang.String</code> host, int&#160;port, <code class="cCode">java.io.InputStream</code>&#160;in, <code class="cCode">java.io.OutputStream</code>&#160;out)throws&#160;IOException<a name="wp264921"> </a>
</pre></div>
<a name="wp264923"> </a><p class="pIndented1">
Establish and SSL session over a reliable stream. This connection will forward the input and output stream close methods to the given connection. If the caller wants to have the given connection closed with this connection, the caller can close given connection after constructing this connection, but leaving the closing of the streams to this connection.
</p>
<a name="wp264925"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp264927"> </a><p class="pIndented2">
<code class="cCode">host</code> - hostname of the SSL server
</p>
<a name="wp264929"> </a><p class="pIndented2">
<code class="cCode">port</code> - port number of the SSL server
</p>
<a name="wp264931"> </a><p class="pIndented2">
<code class="cCode">in</code> - InputStream associated with the StreamConnection
</p>
<a name="wp264933"> </a><p class="pIndented2">
<code class="cCode">out</code> - OutputStream associated with the StreamConnection
</p>
<a name="wp264935"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264937"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if there is a problem initializing the SSL data structures or the SSL handshake fails
</p>
<a name="wp264939"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp264947"> </a><h4 class="pHeading3">
close()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">close</b>()throws&#160;IOException<a name="wp264949"> </a>
</pre></div>
<a name="wp264951"> </a><p class="pIndented1">
Closes the SSL connection. The underlying TCP socket, over which SSL is layered, is also closed unless the latter was opened by an external application and its input/output streams were passed as argument to the SSLStreamConnection constructor.
</p>
<a name="wp264953"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp264955"> </a><p class="pIndented2">
<code class="cCode">close</code> in interface <code class="cCode">Connection</code>
</p>
<a name="wp264957"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264959"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if the SSL connection could not be terminated cleanly
</p>
<a name="wp264967"> </a><h4 class="pHeading3">
getSecurityInfo()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">javax.microedition.io.SecurityInfo</code> <b class="cBold">getSecurityInfo</b>()throws&#160;IOException<a name="wp264969"> </a>
</pre></div>
<a name="wp264971"> </a><p class="pIndented1">
Returns the security information associated with this connection.
</p>
<a name="wp264973"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264975"> </a><p class="pIndented2">
the security information associated with this open connection
</p>
<a name="wp264977"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp264979"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if the connection is closed
</p>
<a name="wp264987"> </a><h4 class="pHeading3">
getServerCertificate()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public com.sun.midp.ssl.X509Certificate <b class="cBold">getServerCertificate</b>()<a name="wp264991"> </a>
</pre></div>
<a name="wp264993"> </a><p class="pIndented1">
Returns the server certificate associated with this connection.
</p>
<a name="wp264995"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp264997"> </a><p class="pIndented2">
the server certificate associated with this connection
</p>
<a name="wp265005"> </a><h4 class="pHeading3">
getTrustedCertStore()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.CertStore <b class="cBold">getTrustedCertStore</b>()<a name="wp265009"> </a>
</pre></div>
<a name="wp265011"> </a><p class="pIndented1">
Gets the certificate store containing trusted root certificates used to verify SSL server certificate chains.
</p>
<a name="wp265013"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265015"> </a><p class="pIndented2">
certificate store containing trusted certificates
</p>
<a name="wp265017"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp265021"> </a><p class="pIndented2">
setTrustedCertStore(CertStore)
</p>
<a name="wp265029"> </a><h4 class="pHeading3">
lockTrustedCertStore()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static void <b class="cBold">lockTrustedCertStore</b>()<a name="wp265031"> </a>
</pre></div>
<a name="wp265033"> </a><p class="pIndented1">
Locks the current trusted certificate store so it cannot be changed. This method does nothing if the trusted certificate store is null.
</p>
<a name="wp265041"> </a><h4 class="pHeading3">
openDataInputStream()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.io.DataInputStream</code> <b class="cBold">openDataInputStream</b>()throws&#160;IOException<a name="wp265043"> </a>
</pre></div>
<a name="wp265045"> </a><p class="pIndented1">
Returns the DataInputStream associated with this SSLStreamConnection.
</p>
<a name="wp265047"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265049"> </a><p class="pIndented2">
<code class="cCode">openDataInputStream</code> in interface <code class="cCode">InputConnection</code>
</p>
<a name="wp265051"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265053"> </a><p class="pIndented2">
a DataInputStream object
</p>
<a name="wp265055"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265057"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if the connection is not open or the stream was already open
</p>
<a name="wp265065"> </a><h4 class="pHeading3">
openDataOutputStream()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.io.DataOutputStream</code> <b class="cBold">openDataOutputStream</b>()throws&#160;IOException<a name="wp265067"> </a>
</pre></div>
<a name="wp265069"> </a><p class="pIndented1">
Returns the DataOutputStream associated with this SSLStreamConnection.
</p>
<a name="wp265071"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265073"> </a><p class="pIndented2">
<code class="cCode">openDataOutputStream</code> in interface <code class="cCode">OutputConnection</code>
</p>
<a name="wp265075"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265077"> </a><p class="pIndented2">
a DataOutputStream object
</p>
<a name="wp265079"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265081"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if the connection is not open or the stream was already open
</p>
<a name="wp265089"> </a><h4 class="pHeading3">
openInputStream()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.io.InputStream</code> <b class="cBold">openInputStream</b>()throws&#160;IOException<a name="wp265091"> </a>
</pre></div>
<a name="wp265093"> </a><p class="pIndented1">
Returns the InputStream associated with this SSLStreamConnection.
</p>
<a name="wp265095"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265097"> </a><p class="pIndented2">
<code class="cCode">openInputStream</code> in interface <code class="cCode">InputConnection</code>
</p>
<a name="wp265099"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265101"> </a><p class="pIndented2">
InputStream object from which SSL protected bytes can be read
</p>
<a name="wp265103"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265105"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if the connection is not open or the stream was already open
</p>
<a name="wp265113"> </a><h4 class="pHeading3">
openOutputStream()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.io.OutputStream</code> <b class="cBold">openOutputStream</b>()throws&#160;IOException<a name="wp265115"> </a>
</pre></div>
<a name="wp265117"> </a><p class="pIndented1">
Returns the OutputStream associated with this SSLStreamConnection.
</p>
<a name="wp265119"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265121"> </a><p class="pIndented2">
<code class="cCode">openOutputStream</code> in interface <code class="cCode">OutputConnection</code>
</p>
<a name="wp265123"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265125"> </a><p class="pIndented2">
OutputStream object such that bytes written to this stream are sent over an SSL secured channel
</p>
<a name="wp265127"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265129"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if the connection is not open or the stream was already open
</p>
<a name="wp265137"> </a><h4 class="pHeading3">
setTrustedCertStore(CertStore)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static void <b class="cBold">setTrustedCertStore</b>(com.sun.midp.ssl.CertStore cs)<a name="wp265141"> </a>
</pre></div>
<a name="wp265143"> </a><p class="pIndented1">
Sets the trusted certificate store which contains root certificates used to verify certificate chains sent by an SSL server. This method does nothing if the certificate store is already locked.
</p>
<a name="wp265145"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp265147"> </a><p class="pIndented2">
<code class="cCode">cs</code> - trusted certificate store to be used
</p>
<a name="wp265149"> </a><h5 class="pHeading4Indented">
See Also:
</h5>
<a name="wp265155"> </a><p class="pIndented2">
lockTrustedCertStore(), getTrustedCertStore()
</p>
<a name="wp265157"> </a><h2 class="pHeading1">
com.sun.midp.ssl
</h2>
<a name="wp265165"> </a><h3 class="pHeading2">
X509Certificate
</h3>
<a name="wp265167"> </a><h4 class="pHeading3">
Declaration
</h4>
<div class="pPreformatted"><pre class="pPreformatted">
public class <span class="cUserType">X509Certificate</span> implements <code class="cCode">javax.microedition.pki.Certificate</code><a name="wp265169"> </a>
 <a name="wp265171"> </a>
<code class="cCode">java.lang.Object</code><a name="wp265173"> </a>
&#160;&#160;|<a name="wp265175"> </a>
&#160;&#160;+--<b class="cBold">com.sun.midp.ssl.X509Certificate</b><a name="wp265177"> </a>
</pre></div>
<a name="wp265179"> </a><h4 class="pHeading3">
All Implemented Interfaces:
</h4>
<a name="wp265181"> </a><p class="pIndented1">
<code class="cCode">javax.microedition.pki.Certificate</code>
</p>
<a name="wp265183"> </a><h4 class="pHeading3">
Description
</h4>
<a name="wp265185"> </a><p class="pBody">
This class implements methods for creating X.509 certificates and accessing their attributes such as subject/issuer names, public keys and validity information. Publicly visible methods are modeled after those in the X509Certificate classes from J2SE&#8482; (Java 2 Platform, Standard Edition) but there are some differences and these are documented below. 
</p>
<a name="wp265187"> </a><p class="pBody">
NOTE: For now, only X.509 certificates containing RSA public keys and signed either using md5WithRSA or sha-1WithRSA are supported. This version of the implementation is unable to parse certificates containing DSA keys or signed using DSA. Certificates containing RSA keys but signed using an unsupported algorithm (e.g. RSA_MD2) can be parsed but cannot be verified. Not all version 3 extensions are supported (only subjectAltName, basicConstraints, keyUsage and extendedKeyUsage are recognized) but if an unrecognized extension is marked critical, an error notification is generated. 
</p>
<a name="wp265190"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Summarizes the fields, constructors, and methods of this class. The left column gives the type, while the right column gives the field name, constructor signature, or method signature, and a description. The rows that span columns are headers." id="wp262690">
  <caption><a name="wp262690"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th class="sun-lightblue" scope="col" colspan="2" rowspan="1"><a name="wp262118"> </a><div style="text-align: left" class="pTableHead">
Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp262124"> </a><div style="text-align: left" class="pTableHead">
Fields
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262130"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
CERT_SIGN_KEY_USAGE<a name="wp262134"> </a>
</pre></div>
<a name="wp262136"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for key certificate sign key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262142"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
CLIENT_AUTH_EXT_KEY_USAGE<a name="wp262146"> </a>
</pre></div>
<a name="wp262148"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask client auth for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262154"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
CODE_SIGN_EXT_KEY_USAGE<a name="wp262158"> </a>
</pre></div>
<a name="wp262160"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit code signing mask for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262166"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
CRL_SIGN_KEY_USAGE<a name="wp262170"> </a>
</pre></div>
<a name="wp262172"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for CRL sign key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262178"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
DATA_ENCIPHER_KEY_USAGE<a name="wp262182"> </a>
</pre></div>
<a name="wp262184"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for data encipherment key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262190"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
DECIPHER_ONLY_KEY_USAGE<a name="wp262194"> </a>
</pre></div>
<a name="wp262196"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for decipher only key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262202"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
DIGITAL_SIG_KEY_USAGE<a name="wp262206"> </a>
</pre></div>
<a name="wp262208"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for digital signature key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262214"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
EMAIL_EXT_KEY_USAGE<a name="wp262218"> </a>
</pre></div>
<a name="wp262220"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit email protection mask for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262226"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
ENCIPHER_ONLY_KEY_USAGE<a name="wp262230"> </a>
</pre></div>
<a name="wp262232"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for encipher only key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262238"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
IPSEC_END_SYS_EXT_KEY_USAGE<a name="wp262242"> </a>
</pre></div>
<a name="wp262244"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit IPSEC end system mask for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262250"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
IPSEC_TUNNEL_EXT_KEY_USAGE<a name="wp262254"> </a>
</pre></div>
<a name="wp262256"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit IPSEC tunnel mask for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262262"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
IPSEC_USER_EXT_KEY_USAGE<a name="wp262266"> </a>
</pre></div>
<a name="wp262268"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit IPSEC user mask for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262274"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
KEY_AGREEMENT_KEY_USAGE<a name="wp262278"> </a>
</pre></div>
<a name="wp262280"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for key agreement key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262286"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
KEY_ENCIPHER_KEY_USAGE<a name="wp262290"> </a>
</pre></div>
<a name="wp262292"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for key encipherment key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262298"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
MISSING_PATH_LENGTH_CONSTRAINT<a name="wp262302"> </a>
</pre></div>
<a name="wp262304"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates that no information is available on the pathLengthConstraint associated with this certificate (this could happen if the certifiate is a v1 or v2 cert or a v3 cert without basicConstraints or a non-CA v3 certificate).
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp262310"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
NO_ERROR<a name="wp262314"> </a>
</pre></div>
<a name="wp262316"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates a no error condition.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262322"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
NON_REPUDIATION_KEY_USAGE<a name="wp262326"> </a>
</pre></div>
<a name="wp262328"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask for non repudiation key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262334"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
SERVER_AUTH_EXT_KEY_USAGE<a name="wp262338"> </a>
</pre></div>
<a name="wp262340"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit mask server auth for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262346"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TIME_STAMP_EXT_KEY_USAGE<a name="wp262350"> </a>
</pre></div>
<a name="wp262352"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Bit time stamping mask for extended key usage.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp262358"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TYPE_DNS_NAME<a name="wp262362"> </a>
</pre></div>
<a name="wp262364"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
DNS name alternative name type code.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp262370"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TYPE_EMAIL_ADDRESS<a name="wp262374"> </a>
</pre></div>
<a name="wp262376"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Email address (rfc 822) alternative name type code.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static byte<a name="wp262382"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
TYPE_URI<a name="wp262386"> </a>
</pre></div>
<a name="wp262388"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
URI alternative name type code.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static int<a name="wp262394"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
UNLIMITED_CERT_CHAIN_LENGTH<a name="wp262398"> </a>
</pre></div>
<a name="wp262400"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Indicates there is no limit to the server certificate chain length.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp262406"> </a><div style="text-align: left" class="pTableHead">
Constructors
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
&#160;<a name="wp262412"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
X509Certificate(byte ver, byte[] rawSerialNumber, java.lang.String sub, java.lang.String iss, long notBefore, long notAfter, byte[] mod, byte[] exp, byte[] chash, int pLen)<a name="wp262416"> </a>
</pre></div>
<a name="wp262418"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Creates an X.509 certificate with the specified attributes.
</div>
</td>
</tr>
  <tr align="left">    <td colspan="2" rowspan="1"><a name="wp262424"> </a><div style="text-align: left" class="pTableHead">
Methods
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp262430"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
checkExtensions()<a name="wp262434"> </a>
</pre></div>
<a name="wp262436"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if a certificate has any (version 3) extensions that were not properly processed and continued use of this certificate may be inconsistent with the issuer&#8217;s intent.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp262442"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
checkValidity()<a name="wp262446"> </a>
</pre></div>
<a name="wp262448"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if the certificate is currently valid.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp262454"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
checkValidity(long time)<a name="wp262458"> </a>
</pre></div>
<a name="wp262460"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if the certificate is valid on the specified time.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static X509Certificate<a name="wp262466"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
generateCertificate(byte[] buf, int off, int len)<a name="wp262470"> </a>
</pre></div>
<a name="wp262472"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Creates a certificate by parsing the ASN.1 DER X.509 certificate encoding in the specified buffer.<br /> <b class="cBold">NOTE:</b> In the standard edition, equivalent functionality is provided by CertificateFactory.generateCertificate(InputStream).
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 int<a name="wp262478"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getBasicConstraints()<a name="wp262482"> </a>
</pre></div>
<a name="wp262484"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the certificate constraints path length from the <code class="cCode">BasicConstraints</code> extension.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 int<a name="wp262490"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getExtKeyUsage()<a name="wp262494"> </a>
</pre></div>
<a name="wp262496"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets a 32-bit bit vector (in the form of an integer) in which each position represents a purpose for which the public key in the certificate may be used (iff that bit is set).
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 byte[]<a name="wp262502"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getFingerprint()<a name="wp262506"> </a>
</pre></div>
<a name="wp262508"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the MD5 fingerprint of this certificate.<br /> <b class="cBold">NOTE:</b> this implementation returns a byte array filled with zeros if there is no fingerprint associated with this certificate.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262514"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getIssuer()<a name="wp262518"> </a>
</pre></div>
<a name="wp262520"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the name of this certificate&#8217;s issuer.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 int<a name="wp262526"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getKeyUsage()<a name="wp262530"> </a>
</pre></div>
<a name="wp262532"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets a 32-bit bit vector (in the form of an integer) in which each position represents a purpose for which the public key in the certificate may be used (iff that bit is set).
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 long<a name="wp262538"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getNotAfter()<a name="wp262542"> </a>
</pre></div>
<a name="wp262544"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the NotAfter date from the certificate&#8217;s validity period.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 long<a name="wp262550"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getNotBefore()<a name="wp262554"> </a>
</pre></div>
<a name="wp262556"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the NotBefore date from the certificate&#8217;s validity period.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 PublicKey<a name="wp262562"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getPublicKey()<a name="wp262566"> </a>
</pre></div>
<a name="wp262568"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the public key from this certificate.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262574"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSerialNumber()<a name="wp262578"> </a>
</pre></div>
<a name="wp262580"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the printable form of the serial number of this <code class="cCode">Certificate</code>.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262586"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSigAlgName()<a name="wp262590"> </a>
</pre></div>
<a name="wp262592"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the name of the algorithm used to sign the certificate.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262598"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSubject()<a name="wp262602"> </a>
</pre></div>
<a name="wp262604"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the name of this certificate&#8217;s subject.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.Object<a name="wp262610"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSubjectAltName()<a name="wp262614"> </a>
</pre></div>
<a name="wp262616"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the subject alternative name or null if it was not in the certificate.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 int<a name="wp262622"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getSubjectAltNameType()<a name="wp262626"> </a>
</pre></div>
<a name="wp262628"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the type of subject alternative name.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262634"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getType()<a name="wp262638"> </a>
</pre></div>
<a name="wp262640"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Get the type of the <code class="cCode">Certificate</code>.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262646"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
getVersion()<a name="wp262650"> </a>
</pre></div>
<a name="wp262652"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Gets the raw X.509 version number of this certificate.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 java.lang.String<a name="wp262658"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
toString()<a name="wp262662"> </a>
</pre></div>
<a name="wp262664"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Returns a string representation of this certificate.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
 void<a name="wp262670"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
verify(PublicKey pk)<a name="wp262674"> </a>
</pre></div>
<a name="wp262676"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Checks if this certificate was signed using the private key corresponding to the specified public key.
</div>
</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
static X509Certificate<a name="wp262682"> </a>
</pre></div>
</td>
    <td><div class="pPreformatted"><pre class="pPreformatted">
verifyChain(java.util.Vector certs, int keyUsage, int extKeyUsage, CertStore certStore)<a name="wp262686"> </a>
</pre></div>
<a name="wp262688"> </a><div style="color: #000000; font-size: 8pt; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 20pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none">
Verify a chain of certificates.
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp265193"> </a><p class="pBody">
</p><div align="left">
<table border="0" cellpadding="7" summary="Lists this class&#39;s inherited methods; the first two rows are headers." id="wp262707">
  <caption><a name="wp262707"> </a><div class="pTableTitle">

</div>
</caption>
<thead>
<tr  align="center">    <th  class="sun-verylightblue" scope="col"><a name="wp262697"> </a><div style="text-align: left" class="pTableHead">
Inherited Member Summary
</div>

</th>
</tr>
</thead>
  <tr align="left">    <td><a name="wp262701"> </a><div style="text-align: left" class="pTableHead">
Methods inherited from class Object
</div>

</td>
</tr>
  <tr align="left">    <td><div class="pPreformatted"><pre class="pPreformatted">
<code class="cCode">equals(Object)</code>, <code class="cCode">getClass()</code>, <code class="cCode">hashCode()</code>, <code class="cCode">notify()</code>, <code class="cCode">notifyAll()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code>, <code class="cCode">wait()</code><a name="wp262705"> </a>
</pre></div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pBody">

</p>
<a name="wp265195"> </a><h3 class="pHeading2">
Fields
</h3>
<a name="wp265203"> </a><h4 class="pHeading3">
CERT_SIGN_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">CERT_SIGN_KEY_USAGE</b><a name="wp265205"> </a>
</pre></div>
<a name="wp265207"> </a><p class="pIndented1">
Bit mask for key certificate sign key usage.
</p>
<a name="wp265215"> </a><h4 class="pHeading3">
CLIENT_AUTH_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">CLIENT_AUTH_EXT_KEY_USAGE</b><a name="wp265217"> </a>
</pre></div>
<a name="wp265219"> </a><p class="pIndented1">
Bit mask client auth for extended key usage.
</p>
<a name="wp265227"> </a><h4 class="pHeading3">
CODE_SIGN_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">CODE_SIGN_EXT_KEY_USAGE</b><a name="wp265229"> </a>
</pre></div>
<a name="wp265231"> </a><p class="pIndented1">
Bit code signing mask for extended key usage.
</p>
<a name="wp265239"> </a><h4 class="pHeading3">
CRL_SIGN_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">CRL_SIGN_KEY_USAGE</b><a name="wp265241"> </a>
</pre></div>
<a name="wp265243"> </a><p class="pIndented1">
Bit mask for CRL sign key usage.
</p>
<a name="wp265251"> </a><h4 class="pHeading3">
DATA_ENCIPHER_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">DATA_ENCIPHER_KEY_USAGE</b><a name="wp265253"> </a>
</pre></div>
<a name="wp265255"> </a><p class="pIndented1">
Bit mask for data encipherment key usage.
</p>
<a name="wp265263"> </a><h4 class="pHeading3">
DECIPHER_ONLY_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">DECIPHER_ONLY_KEY_USAGE</b><a name="wp265265"> </a>
</pre></div>
<a name="wp265267"> </a><p class="pIndented1">
Bit mask for decipher only key usage.
</p>
<a name="wp265275"> </a><h4 class="pHeading3">
DIGITAL_SIG_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">DIGITAL_SIG_KEY_USAGE</b><a name="wp265277"> </a>
</pre></div>
<a name="wp265279"> </a><p class="pIndented1">
Bit mask for digital signature key usage.
</p>
<a name="wp265287"> </a><h4 class="pHeading3">
EMAIL_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">EMAIL_EXT_KEY_USAGE</b><a name="wp265289"> </a>
</pre></div>
<a name="wp265291"> </a><p class="pIndented1">
Bit email protection mask for extended key usage.
</p>
<a name="wp265299"> </a><h4 class="pHeading3">
ENCIPHER_ONLY_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">ENCIPHER_ONLY_KEY_USAGE</b><a name="wp265301"> </a>
</pre></div>
<a name="wp265303"> </a><p class="pIndented1">
Bit mask for encipher only key usage.
</p>
<a name="wp265311"> </a><h4 class="pHeading3">
IPSEC_END_SYS_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">IPSEC_END_SYS_EXT_KEY_USAGE</b><a name="wp265313"> </a>
</pre></div>
<a name="wp265315"> </a><p class="pIndented1">
Bit IPSEC end system mask for extended key usage.
</p>
<a name="wp265323"> </a><h4 class="pHeading3">
IPSEC_TUNNEL_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">IPSEC_TUNNEL_EXT_KEY_USAGE</b><a name="wp265325"> </a>
</pre></div>
<a name="wp265327"> </a><p class="pIndented1">
Bit IPSEC tunnel mask for extended key usage.
</p>
<a name="wp265335"> </a><h4 class="pHeading3">
IPSEC_USER_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">IPSEC_USER_EXT_KEY_USAGE</b><a name="wp265337"> </a>
</pre></div>
<a name="wp265339"> </a><p class="pIndented1">
Bit IPSEC user mask for extended key usage.
</p>
<a name="wp265347"> </a><h4 class="pHeading3">
KEY_AGREEMENT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">KEY_AGREEMENT_KEY_USAGE</b><a name="wp265349"> </a>
</pre></div>
<a name="wp265351"> </a><p class="pIndented1">
Bit mask for key agreement key usage.
</p>
<a name="wp265359"> </a><h4 class="pHeading3">
KEY_ENCIPHER_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">KEY_ENCIPHER_KEY_USAGE</b><a name="wp265361"> </a>
</pre></div>
<a name="wp265363"> </a><p class="pIndented1">
Bit mask for key encipherment key usage.
</p>
<a name="wp265371"> </a><h4 class="pHeading3">
MISSING_PATH_LENGTH_CONSTRAINT
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">MISSING_PATH_LENGTH_CONSTRAINT</b><a name="wp265373"> </a>
</pre></div>
<a name="wp265375"> </a><p class="pIndented1">
Indicates that no information is available on the pathLengthConstraint associated with this certificate (this could happen if the certifiate is a v1 or v2 cert or a v3 cert without basicConstraints or a non-CA v3 certificate).
</p>
<a name="wp265383"> </a><h4 class="pHeading3">
NO_ERROR
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">NO_ERROR</b><a name="wp265385"> </a>
</pre></div>
<a name="wp265387"> </a><p class="pIndented1">
Indicates a no error condition.
</p>
<a name="wp265395"> </a><h4 class="pHeading3">
NON_REPUDIATION_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">NON_REPUDIATION_KEY_USAGE</b><a name="wp265397"> </a>
</pre></div>
<a name="wp265399"> </a><p class="pIndented1">
Bit mask for non repudiation key usage.
</p>
<a name="wp265407"> </a><h4 class="pHeading3">
SERVER_AUTH_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">SERVER_AUTH_EXT_KEY_USAGE</b><a name="wp265409"> </a>
</pre></div>
<a name="wp265411"> </a><p class="pIndented1">
Bit mask server auth for extended key usage.
</p>
<a name="wp265419"> </a><h4 class="pHeading3">
TIME_STAMP_EXT_KEY_USAGE
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">TIME_STAMP_EXT_KEY_USAGE</b><a name="wp265421"> </a>
</pre></div>
<a name="wp265423"> </a><p class="pIndented1">
Bit time stamping mask for extended key usage.
</p>
<a name="wp265431"> </a><h4 class="pHeading3">
TYPE_DNS_NAME
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">TYPE_DNS_NAME</b><a name="wp265433"> </a>
</pre></div>
<a name="wp265435"> </a><p class="pIndented1">
DNS name alternative name type code.
</p>
<a name="wp265443"> </a><h4 class="pHeading3">
TYPE_EMAIL_ADDRESS
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">TYPE_EMAIL_ADDRESS</b><a name="wp265445"> </a>
</pre></div>
<a name="wp265447"> </a><p class="pIndented1">
Email address (rfc 822) alternative name type code.
</p>
<a name="wp265455"> </a><h4 class="pHeading3">
TYPE_URI
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final byte <b class="cBold">TYPE_URI</b><a name="wp265457"> </a>
</pre></div>
<a name="wp265459"> </a><p class="pIndented1">
URI alternative name type code.
</p>
<a name="wp265467"> </a><h4 class="pHeading3">
UNLIMITED_CERT_CHAIN_LENGTH
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static final int <b class="cBold">UNLIMITED_CERT_CHAIN_LENGTH</b><a name="wp265469"> </a>
</pre></div>
<a name="wp265471"> </a><p class="pIndented1">
Indicates there is no limit to the server certificate chain length.
</p>
<a name="wp265473"> </a><h3 class="pHeading2">
Constructors
</h3>
<a name="wp265481"> </a><h4 class="pHeading3">
X509Certificate(byte, byte[], String, String, long, long, byte[], byte[], byte[], int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <b class="cBold">X509Certificate</b>(byte ver, byte[]&#160;rawSerialNumber, <code class="cCode">java.lang.String</code>&#160;sub, <code class="cCode">java.lang.String</code>&#160;iss, long&#160;notBefore, long&#160;notAfter, byte[]&#160;mod, byte[]&#160;exp, byte[]&#160;chash, int&#160;pLen)throws&#160;Exception<a name="wp265483"> </a>
</pre></div>
<a name="wp265485"> </a><p class="pIndented1">
Creates an X.509 certificate with the specified attributes. This constructor is only used for creating trusted certificates. 
</p>
<a name="wp1043654"> </a><p class="pIndented1">
<b class="cBold">NOTE:</b> All signature related values in these certificates (such as the signing algorithm and signature) are set to null and invoking methods that access signature information, e.g. verify() and getSigAlgName() can produce unexpected errors. 
</p>
<a name="wp265487"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp265489"> </a><p class="pIndented2">
<code class="cCode">ver</code> - byte containing X.509 version
</p>
<a name="wp265491"> </a><p class="pIndented2">
<code class="cCode">rawSerialNumber</code> - byte array containing the serial number
</p>
<a name="wp265493"> </a><p class="pIndented2">
<code class="cCode">sub</code> - subject name
</p>
<a name="wp265495"> </a><p class="pIndented2">
<code class="cCode">iss</code> - issuer name
</p>
<a name="wp265497"> </a><p class="pIndented2">
<code class="cCode">notBefore</code> - start of validity period expressed in milliseconds since midnight Jan 1, 1970 UTC
</p>
<a name="wp265499"> </a><p class="pIndented2">
<code class="cCode">notAfter</code> - end of validity period expressed as above
</p>
<a name="wp265501"> </a><p class="pIndented2">
<code class="cCode">mod</code> - modulus associated with the RSA Public Key
</p>
<a name="wp265503"> </a><p class="pIndented2">
<code class="cCode">exp</code> - exponent associated with the RSA Public Key
</p>
<a name="wp265505"> </a><p class="pIndented2">
<code class="cCode">chash</code> - 16-byte MD5 hash of the certificate&#8217;s ASN.1 DER encoding
</p>
<a name="wp265507"> </a><p class="pIndented2">
<code class="cCode">pLen</code> - Is the pathLenConstraint associated with a version 3 certificate. This parameter is ignored for v1 and v2 certificates. If a v3 certificate does not have basicConstraints or is not a CA cert, callers should pass MISSING_PATH_LENGTH_CONSTRAINT. If the v3 certificate has basicConstraints, CA is set but pathLenConstraint is missing (indicating no limit on the certificate chain), callers should pass UNLIMITED_CERT_CHAIN_LENGTH.
</p>
<a name="wp265509"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265511"> </a><p class="pIndented2">
<code class="cCode">java.lang.Exception</code> - in case of a problem with RSA public key parameters
</p>
<a name="wp265513"> </a><h3 class="pHeading2">
Methods
</h3>
<a name="wp265521"> </a><h4 class="pHeading3">
checkExtensions()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">checkExtensions</b>()throws&#160;CertificateException<a name="wp265523"> </a>
</pre></div>
<a name="wp265525"> </a><p class="pIndented1">
Checks if a certificate has any (version 3) extensions that were not properly processed and continued use of this certificate may be inconsistent with the issuer&#8217;s intent. This may happen, for example, if the certificate has unrecognized critical extensions.
</p>
<a name="wp265527"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265529"> </a><p class="pIndented2">
<code class="cCode">javax.microedition.pki.CertificateException</code> - with a reason ofr BAD_EXTENSIONS if there are any bad extensions
</p>
<a name="wp265537"> </a><h4 class="pHeading3">
checkValidity()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">checkValidity</b>()throws&#160;CertificateException<a name="wp265539"> </a>
</pre></div>
<a name="wp265541"> </a><p class="pIndented1">
Checks if the certificate is currently valid. It is if the current date and time are within the certificate&#8217;s validity period.
</p>
<a name="wp265543"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265545"> </a><p class="pIndented2">
<code class="cCode">javax.microedition.pki.CertificateException</code> - with a reason of EXPIRED or NOT_YET_VALID
</p>
<a name="wp265553"> </a><h4 class="pHeading3">
checkValidity(long)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">checkValidity</b>(long time)throws&#160;CertificateException<a name="wp265555"> </a>
</pre></div>
<a name="wp265557"> </a><p class="pIndented1">
Checks if the certificate is valid on the specified time. It is if the specified time is within the certificate&#8217;s validity period. 
</p>
<a name="wp1043657"> </a><p class="pIndented1">
<b class="cBold">NOTE:</b> The standard edition provides a method with this name but it throws different types of exceptions rather than returning error codes. 
</p>
<a name="wp265559"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp265561"> </a><p class="pIndented2">
<code class="cCode">time</code> - the time in milliseconds for which a certificate&#8217;s validity is to be checked
</p>
<a name="wp265563"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265565"> </a><p class="pIndented2">
<code class="cCode">javax.microedition.pki.CertificateException</code> - with a reason of EXPIRED or NOT_YET_VALID
</p>
<a name="wp265573"> </a><h4 class="pHeading3">
generateCertificate(byte[], int, int)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.X509Certificate <b class="cBold">generateCertificate</b>(byte[] buf, int&#160;off, int&#160;len)throws&#160;IOException<a name="wp265577"> </a>
</pre></div>
<a name="wp265579"> </a><p class="pIndented1">
Creates a certificate by parsing the ASN.1 DER X.509 certificate encoding in the specified buffer. 
</p>
<a name="wp1043660"> </a><p class="pIndented1">
<b class="cBold">NOTE:</b> In the standard edition, equivalent functionality is provided by CertificateFactory.generateCertificate(InputStream). 
</p>
<a name="wp265581"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp265583"> </a><p class="pIndented2">
<code class="cCode">buf</code> - byte array to be read
</p>
<a name="wp265585"> </a><p class="pIndented2">
<code class="cCode">off</code> - offset within the byte array
</p>
<a name="wp265587"> </a><p class="pIndented2">
<code class="cCode">len</code> - number of bytes to be read
</p>
<a name="wp265589"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265591"> </a><p class="pIndented2">
a certificate object corresponding to the DER encoding or null (in case of an encoding problem)
</p>
<a name="wp265593"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265595"> </a><p class="pIndented2">
<code class="cCode">java.io.IOException</code> - if there is a parsing error
</p>
<a name="wp265603"> </a><h4 class="pHeading3">
getBasicConstraints()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public int <b class="cBold">getBasicConstraints</b>()<a name="wp265605"> </a>
</pre></div>
<a name="wp265607"> </a><p class="pIndented1">
Gets the certificate constraints path length from the <code class="cCode">BasicConstraints</code> extension. 
</p>
<a name="wp265609"> </a><p class="pIndented1">
The <code class="cCode">BasicConstraints</code> extension identifies whether the subject of the certificate is a Certificate Authority (CA) and how deep a certification path may exist through the CA. The <code class="cCode">pathLenConstraint</code> field (see below) is meaningful only if <code class="cCode">cA</code> is set to TRUE. In this case, it gives the maximum number of CA certificates that may follow this certificate in a certification path. A value of zero indicates that only an end-entity certificate may follow in the path. 
</p>
<a name="wp265611"> </a><p class="pIndented1">
Note that for RFC 2459 this extension is always marked critical if <code class="cCode">cA</code> is TRUE, meaning this certificate belongs to a Certificate Authority. 
</p>
<a name="wp265613"> </a><p class="pIndented1">
The ASN.1 definition for this is: 
</p>
<div class="pPreformatted"><pre class="pPreformatted">
&#160;&#160;&#160;&#160;&#160;&#160;BasicConstraints&#160;::=&#160;SEQUENCE&#160;{<a name="wp265615"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;cA&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;BOOLEAN&#160;DEFAULT&#160;FALSE,<a name="wp265617"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;pathLenConstraint&#160;&#160;&#160;INTEGER&#160;(0..MAX)&#160;OPTIONAL&#160;<a name="wp265619"> </a>
&#160;&#160;&#160;&#160;&#160;&#160;}<a name="wp265621"> </a>
&#160;&#160;<a name="wp265623"> </a>
</pre></div>
<a name="wp265625"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265627"> </a><p class="pIndented2">
MISSING_PATH_LENGTH_CONSTRAINT if the <code class="cCode">BasicConstraints</code> extension is absent or the subject of the certificate is not a CA. If the subject of the certificate is a CA and <code class="cCode">pathLenConstraint</code> does not appear, <code class="cCode">UNLIMITED_CERT_CHAIN_LENGTH</code> is returned to indicate that there is no limit to the allowed length of the certification path. In all other situations, the actual value of the <code class="cCode">pathLenConstraint</code> is returned.
</p>
<a name="wp265635"> </a><h4 class="pHeading3">
getExtKeyUsage()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public int <b class="cBold">getExtKeyUsage</b>()<a name="wp265637"> </a>
</pre></div>
<a name="wp265639"> </a><p class="pIndented1">
Gets a 32-bit bit vector (in the form of an integer) in which each position represents a purpose for which the public key in the certificate may be used (iff that bit is set). The correspondence between bit positions and purposes is as follows: </p><div align="left">
<table border="0" cellpadding="7" summary="Left column is a purpose; the right column is its bit position." id="wp262774">
  <caption><a name="wp262774"> </a><div class="pTableTitle">

</div>
</caption>
  <tr align="left">    <td><a name="wp262714"> </a><div class="pTableText">
serverAuth
</div>
</td>
    <td><a name="wp262716"> </a><div class="pTableText">
1
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262722"> </a><div class="pTableText">
clientAuth
</div>
</td>
    <td><a name="wp262724"> </a><div class="pTableText">
2
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262730"> </a><div class="pTableText">
codeSigning
</div>
</td>
    <td><a name="wp262732"> </a><div class="pTableText">
3
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262738"> </a><div class="pTableText">
emailProtection
</div>
</td>
    <td><a name="wp262740"> </a><div class="pTableText">
4
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262746"> </a><div class="pTableText">
ipsecEndSystem
</div>
</td>
    <td><a name="wp262748"> </a><div class="pTableText">
5
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262754"> </a><div class="pTableText">
ipsecTunnel
</div>
</td>
    <td><a name="wp262756"> </a><div class="pTableText">
6
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262762"> </a><div class="pTableText">
ipsecUser
</div>
</td>
    <td><a name="wp262764"> </a><div class="pTableText">
7
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262770"> </a><div class="pTableText">
timeStamping
</div>
</td>
    <td><a name="wp262772"> </a><div class="pTableText">
8
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pIndented1">

</p>
<a name="wp265644"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265646"> </a><p class="pIndented2">
a bitvector indicating extended usage of the certificate public key, -1 if a critical extendedKeyUsage extension is not present.
</p>
<a name="wp265654"> </a><h4 class="pHeading3">
getFingerprint()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public byte[] <b class="cBold">getFingerprint</b>()<a name="wp265656"> </a>
</pre></div>
<a name="wp265658"> </a><p class="pIndented1">
Gets the MD5 fingerprint of this certificate. 
</p>
<a name="wp1043643"> </a><p class="pIndented1">
<b class="cBold">NOTE:</b> this implementation returns a byte array filled with zeros if there is no fingerprint associated with this certificate. This may happen if a null was passed to the X509Certificate constructor. 
</p>
<a name="wp265660"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265662"> </a><p class="pIndented2">
a byte array containing this certificate&#8217;s MD5 hash
</p>
<a name="wp265670"> </a><h4 class="pHeading3">
getIssuer()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">getIssuer</b>()<a name="wp265672"> </a>
</pre></div>
<a name="wp265674"> </a><p class="pIndented1">
Gets the name of this certificate&#8217;s issuer. 
</p>
<a name="wp1043663"> </a><p class="pIndented1">
<b class="cBold">NOTE:</b> The corresponding method in the standard edition is getIssuerDN() and returns a Principal. 
</p>
<a name="wp265676"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265678"> </a><p class="pIndented2">
<code class="cCode">getIssuer</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265680"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265682"> </a><p class="pIndented2">
a string containing this certificate&#8217;s issuer in user-friendly form
</p>
<a name="wp265690"> </a><h4 class="pHeading3">
getKeyUsage()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public int <b class="cBold">getKeyUsage</b>()<a name="wp265692"> </a>
</pre></div>
<a name="wp265694"> </a><p class="pIndented1">
Gets a 32-bit bit vector (in the form of an integer) in which each position represents a purpose for which the public key in the certificate may be used (iff that bit is set). The correspondence between bit positions and purposes is as follows: </p><div align="left">
<table border="0" cellpadding="7" summary="Left column is a purpose and the right column is its bit position" id="wp262851">
  <caption><a name="wp262851"> </a><div class="pTableTitle">

</div>
</caption>
  <tr align="left">    <td><a name="wp262783"> </a><div class="pTableText">
digitalSignature
</div>
</td>
    <td><a name="wp262785"> </a><div class="pTableText">
0
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262791"> </a><div class="pTableText">
nonRepudiation
</div>
</td>
    <td><a name="wp262793"> </a><div class="pTableText">
1
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262799"> </a><div class="pTableText">
keyEncipherment
</div>
</td>
    <td><a name="wp262801"> </a><div class="pTableText">
2
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262807"> </a><div class="pTableText">
dataEncipherment
</div>
</td>
    <td><a name="wp262809"> </a><div class="pTableText">
3
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262815"> </a><div class="pTableText">
keyAgreement
</div>
</td>
    <td><a name="wp262817"> </a><div class="pTableText">
4
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262823"> </a><div class="pTableText">
keyCertSign
</div>
</td>
    <td><a name="wp262825"> </a><div class="pTableText">
5
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262831"> </a><div class="pTableText">
cRLSign
</div>
</td>
    <td><a name="wp262833"> </a><div class="pTableText">
6
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262839"> </a><div class="pTableText">
encipherOnly
</div>
</td>
    <td><a name="wp262841"> </a><div class="pTableText">
7
</div>
</td>
</tr>
  <tr align="left">    <td><a name="wp262847"> </a><div class="pTableText">
decipherOnly
</div>
</td>
    <td><a name="wp262849"> </a><div class="pTableText">
8
</div>
</td>
</tr>
<tr><td colspan="15"><hr class="pTableHr" /></td></tr>
</table>
</div>
<p class="pIndented1">

</p>
<a name="wp265699"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265701"> </a><p class="pIndented2">
a bitvector indicating approved key usage of the certificate public key, -1 if a KeyUsage extension is not present.
</p>
<a name="wp265709"> </a><h4 class="pHeading3">
getNotAfter()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public long <b class="cBold">getNotAfter</b>()<a name="wp265711"> </a>
</pre></div>
<a name="wp265713"> </a><p class="pIndented1">
Gets the NotAfter date from the certificate&#8217;s validity period.
</p>
<a name="wp265715"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265717"> </a><p class="pIndented2">
<code class="cCode">getNotAfter</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265719"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265721"> </a><p class="pIndented2">
a date after which the certificate is not valid (expiration date)
</p>
<a name="wp265729"> </a><h4 class="pHeading3">
getNotBefore()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public long <b class="cBold">getNotBefore</b>()<a name="wp265731"> </a>
</pre></div>
<a name="wp265733"> </a><p class="pIndented1">
Gets the NotBefore date from the certificate&#8217;s validity period. 
</p>
<a name="wp265735"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265737"> </a><p class="pIndented2">
<code class="cCode">getNotBefore</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265739"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265741"> </a><p class="pIndented2">
a date before which the certificate is not valid
</p>
<a name="wp265749"> </a><h4 class="pHeading3">
getPublicKey()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public com.sun.midp.ssl.PublicKey <b class="cBold">getPublicKey</b>()throws&#160;CertificateException<a name="wp265753"> </a>
</pre></div>
<a name="wp265755"> </a><p class="pIndented1">
Gets the public key from this certificate. 
</p>
<a name="wp265757"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265759"> </a><p class="pIndented2">
the public key contained in the certificate
</p>
<a name="wp265761"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265763"> </a><p class="pIndented2">
<code class="cCode">javax.microedition.pki.CertificateException</code> - if public key is not a supported type (could not be parsed).
</p>
<a name="wp265771"> </a><h4 class="pHeading3">
getSerialNumber()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">getSerialNumber</b>()<a name="wp265773"> </a>
</pre></div>
<a name="wp265775"> </a><p class="pIndented1">
Gets the printable form of the serial number of this <code class="cCode">Certificate</code>. If the serial number within the <code class="cCode">certificate</code> is binary is should be formatted as a string using hexadecimal notation with each byte represented as two hex digits separated byte &#8220;:&#8221; (Unicode x3A). For example, 27:56:FA:80.
</p>
<a name="wp265777"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265779"> </a><p class="pIndented2">
<code class="cCode">getSerialNumber</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265781"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265783"> </a><p class="pIndented2">
A string containing the serial number in user-friendly form; <code class="cCode">NULL</code> is returned if there is no serial number.
</p>
<a name="wp265791"> </a><h4 class="pHeading3">
getSigAlgName()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">getSigAlgName</b>()<a name="wp265793"> </a>
</pre></div>
<a name="wp265795"> </a><p class="pIndented1">
Gets the name of the algorithm used to sign the certificate. 
</p>
<a name="wp265797"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265799"> </a><p class="pIndented2">
<code class="cCode">getSigAlgName</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265801"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265803"> </a><p class="pIndented2">
the name of signature algorithm
</p>
<a name="wp265811"> </a><h4 class="pHeading3">
getSubject()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">getSubject</b>()<a name="wp265813"> </a>
</pre></div>
<a name="wp265815"> </a><p class="pIndented1">
Gets the name of this certificate&#8217;s subject. 
</p>
<a name="wp1043666"> </a><p class="pIndented1">
<b class="cBold">NOTE:</b> The corresponding method in the standard edition is getSubjectDN() and returns a Principal. 
</p>
<a name="wp265817"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265819"> </a><p class="pIndented2">
<code class="cCode">getSubject</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265821"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265823"> </a><p class="pIndented2">
a string containing this certificate&#8217;s subject in user-friendly form
</p>
<a name="wp265831"> </a><h4 class="pHeading3">
getSubjectAltName()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.Object</code> <b class="cBold">getSubjectAltName</b>()<a name="wp265833"> </a>
</pre></div>
<a name="wp265835"> </a><p class="pIndented1">
Gets the subject alternative name or null if it was not in the certificate.
</p>
<a name="wp265837"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265839"> </a><p class="pIndented2">
type of subject alternative name or null
</p>
<a name="wp265847"> </a><h4 class="pHeading3">
getSubjectAltNameType()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public int <b class="cBold">getSubjectAltNameType</b>()<a name="wp265849"> </a>
</pre></div>
<a name="wp265851"> </a><p class="pIndented1">
Gets the type of subject alternative name.
</p>
<a name="wp265853"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265855"> </a><p class="pIndented2">
type of subject alternative name
</p>
<a name="wp265863"> </a><h4 class="pHeading3">
getType()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">getType</b>()<a name="wp265865"> </a>
</pre></div>
<a name="wp265867"> </a><p class="pIndented1">
Get the type of the <code class="cCode">Certificate</code>.
</p>
<a name="wp265869"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265871"> </a><p class="pIndented2">
<code class="cCode">getType</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265873"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265875"> </a><p class="pIndented2">
The type of the <code class="cCode">Certificate</code>; the value MUST NOT be <code class="cCode">NULL</code>.
</p>
<a name="wp265883"> </a><h4 class="pHeading3">
getVersion()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">getVersion</b>()<a name="wp265885"> </a>
</pre></div>
<a name="wp265887"> </a><p class="pIndented1">
Gets the raw X.509 version number of this certificate. Version 1 is 0.
</p>
<a name="wp265889"> </a><h5 class="pHeading4Indented">
Specified By:
</h5>
<a name="wp265891"> </a><p class="pIndented2">
<code class="cCode">getVersion</code> in interface <code class="cCode">Certificate</code>
</p>
<a name="wp265893"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265895"> </a><p class="pIndented2">
the X.509 logic version number (1, 2, 3) of the certificate
</p>
<a name="wp265903"> </a><h4 class="pHeading3">
toString()
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public <code class="cCode">java.lang.String</code> <b class="cBold">toString</b>()<a name="wp265905"> </a>
</pre></div>
<a name="wp265907"> </a><p class="pIndented1">
Returns a string representation of this certificate. 
</p>
<a name="wp265909"> </a><h5 class="pHeading4Indented">
Overrides:
</h5>
<a name="wp265911"> </a><p class="pIndented2">
<code class="cCode">toString</code> in class <code class="cCode">Object</code>
</p>
<a name="wp265913"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265915"> </a><p class="pIndented2">
a human readable string representation of this certificate
</p>
<a name="wp265923"> </a><h4 class="pHeading3">
verify(PublicKey)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public void <b class="cBold">verify</b>(com.sun.midp.ssl.PublicKey pk)throws&#160;CertificateException<a name="wp265927"> </a>
</pre></div>
<a name="wp265929"> </a><p class="pIndented1">
Checks if this certificate was signed using the private key corresponding to the specified public key.
</p>
<a name="wp265931"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp265933"> </a><p class="pIndented2">
<code class="cCode">pk</code> - public key to be used for verifying certificate signature
</p>
<a name="wp265935"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265937"> </a><p class="pIndented2">
<code class="cCode">javax.microedition.pki.CertificateException</code> - if there is an error
</p>
<a name="wp265945"> </a><h4 class="pHeading3">
verifyChain(Vector, int, int, CertStore)
</h4>
<div class="pPreformattedRelative"><pre class="pPreformattedRelative">
public static com.sun.midp.ssl.X509Certificate <b class="cBold">verifyChain</b>(<code class="cCode">java.util.Vector</code> certs, int&#160;keyUsage, int&#160;extKeyUsage, com.sun.midp.ssl.CertStore&#160;certStore)throws&#160;CertificateException<a name="wp265951"> </a>
</pre></div>
<a name="wp265953"> </a><p class="pIndented1">
Verify a chain of certificates.
</p>
<a name="wp265955"> </a><h5 class="pHeading4Indented">
Parameters:
</h5>
<a name="wp265957"> </a><p class="pIndented2">
<code class="cCode">certs</code> - list of certificates with first being entity certificate and the last being the CA issued certificate.
</p>
<a name="wp265959"> </a><p class="pIndented2">
<code class="cCode">keyUsage</code> - -1 to not check the key usage extension, or a key usage bit mask to check for if the extension is present
</p>
<a name="wp265961"> </a><p class="pIndented2">
<code class="cCode">extKeyUsage</code> - -1 to not check the extended key usage extension, or a extended key usage bit mask to check for if the extension is present
</p>
<a name="wp265963"> </a><p class="pIndented2">
<code class="cCode">certStore</code> - store of trusted CA certificates
</p>
<a name="wp265965"> </a><h5 class="pHeading4Indented">
Returns:
</h5>
<a name="wp265967"> </a><p class="pIndented2">
first certificate signed by a CA in the given certificate store
</p>
<a name="wp265969"> </a><h5 class="pHeading4Indented">
Throws:
</h5>
<a name="wp265971"> </a><p class="pIndented2">
<code class="cCode">javax.microedition.pki.CertificateException</code> - if there is an error verifying the chain
</p>

    <p>&#160;</p>
    <hr class="pHr" />

    <table class="full-width" id="SummaryNotReq2">
      <tr>
        <td class="go-left">
          <a accesskey="c" href="index.html">
	    <img id="LongDescNotReq1" src="images/toc.gif" border="0"
              alt="Contents" /></a>
	  <a accesskey="p" href="appx-config-opts.html">
	    <img id="LongDescNotReq2" src="images/prev.gif" border="0"
              alt="Previous" /></a>
	  <a accesskey="n" href="portIX.html">
	    <img id="LongDescNotReq3" src="images/next.gif" border="0"
              alt="Next" /></a>
	  <a accesskey="i" href="portIX.html">
	    <img id="LongDescNotReq4" src="images/index.gif" border="0"
              alt="Index" /></a>
        </td>
        <td class="go-right">
          <span class="copyright">Porting MIDP <br /> MIDP Reference Implementation, Version 2.0 FCS</span>
        </td>
      </tr>
    </table>

    <p>&#160;</p>
    <p class="copyright"><a 
       href="copyright.html">Copyright</a> &#169;
       2002 Sun Microsystems, Inc. All rights reserved.</p>	
  </body>
</html>
